-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Composite operations on chunked array types not dispatched through chunk manager #9523
Comments
looking at the docstring of the chunk manager base class, it appears this is not used for all reductions: xarray/xarray/namedarray/parallelcompat.py Lines 386 to 390 in d26144d
In other words, this seems to be expected behavior? I wonder if |
Reminding myself of how this works, I think yes, this is expected. The array type knows how to do a chunked
It won't (see xarray/xarray/namedarray/core.py Line 914 in cde720f
but I also don't think it needs to either. xarray/xarray/core/duck_array_ops.py Line 795 in cde720f
If arkouda chose not to implement So actually other than documenting / testing this a bit better I believe there is not actually a bug to be fixed here? |
Okay that makes sense. Thank you both for digging into the implementation/docs to figure that out. I'll work on implementing
I think that's correct |
What happened?
The arkouda-xarray chunk manager (found here) is designed to allow Arkouda's distributed arrays to operate as chunked arrays in XArray. (Note Arkouda's array's also implement the array API, which was being used for XArray interoperability before the chunk manager was created).
When executing various operations on XArray DataArrays or DataSets that are backed by the Arkouda chunk manager, I noticed that they are not being routed through the chunk manager itself. For example, calling
myArkoudaBackedArray.mean(axis="some-axis")
does not get routed throughArkoudaManager.reduction
. However, the operation is successful and produces the correct result, indicating that the array-api implementation ofmean
is being used instead (i.e., the arkouda-backed array is being treated as a duck array).https://github.com/jeremiah-corrado/arkouda-xarray-seasonal-avgs-example/blob/main/README.md contains a full example where I observed the above behavior. It includes instructions to get Arkouda set up for XArray interoperability.
pinging @TomNicholas, since we discussed this the other day.
MVCE confirmation
Relevant log output
No response
Anything else we need to know?
No response
Environment
INSTALLED VERSIONS
commit: None
python: 3.11.9 | packaged by conda-forge | (main, Apr 19 2024, 18:34:54) [Clang 16.0.6 ]
python-bits: 64
OS: Darwin
OS-release: 22.6.0
machine: arm64
processor: arm
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: ('en_US', 'UTF-8')
libhdf5: 1.12.2
libnetcdf: None
xarray: 2024.5.0
pandas: 2.2.2
numpy: 1.26.4
scipy: 1.13.1
netCDF4: None
pydap: None
h5netcdf: None
h5py: 3.8.0
zarr: None
cftime: 1.6.3
nc_time_axis: None
iris: None
bottleneck: None
dask: None
distributed: None
matplotlib: 3.8.4
cartopy: None
seaborn: None
numbagg: None
fsspec: None
cupy: None
pint: None
sparse: None
flox: None
numpy_groupies: None
setuptools: 70.0.0
pip: 24.0
conda: None
pytest: None
mypy: None
IPython: 8.24.0
sphinx: None
The text was updated successfully, but these errors were encountered: