-
-
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
Fast-track unstack doesn't work with dask #5346
Comments
That's not good. Great spot @aulemahal . We may well not have tests for multiple dimensions. We could revert this commit and release a patch release. Any thoughts @Illviljan ? |
Yeah, reverting it for now sounds good. Unless we can easily add a single dimension check? |
I'm not sure I understand the "dimensions" thing, isn't the MWE 1D? What is the case where it should work? |
Dask can do this nowadays: x = da.array([1, 2, 3, 5])
x[(Ellipsis, [1, 2])] = 6, 7
x[(Ellipsis, [0, 3])] = 9, 8
x.compute()
Out[51]: array([9, 6, 7, 8]) But I suppose I was a little too eager to get this working and it felt like I got caught in plenty of tests. |
TBC, no great stress — both of us should have checked whether we had tests (and the project should have had them!). |
The new version is released and works with the original example. Thank a lot @aulemahal for the issue. |
What happened:
Using
unstack
on data with the dask backend fails with a dask error.What you expected to happen:
No failure, as with xarray 0.18.0 and earlier.
Minimal Complete Verifiable Example:
Fails with:
The example works when I go back to xarray 0.18.0.
Anything else we need to know?:
I saw no tests in "test_daraarray.py" and "test_dataset.py" for unstack+dask, but they might be elsewhere?
If #5315 was successful, maybe there is something specific in my example and config that is causing the error? @max-sixty @Illviljan
Proposed test, for "test_dataset.py", adapted copy of
test_unstack
:Environment:
Output of xr.show_versions()
INSTALLED VERSIONS
commit: None
python: 3.8.8 | packaged by conda-forge | (default, Feb 20 2021, 16:22:27)
[GCC 9.3.0]
python-bits: 64
OS: Linux
OS-release: 5.11.16-arch1-1
machine: x86_64
processor:
byteorder: little
LC_ALL: None
LANG: fr_CA.utf8
LOCALE: ('fr_CA', 'UTF-8')
libhdf5: 1.10.6
libnetcdf: 4.7.4
xarray: 0.18.2.dev2+g6d2a7301
pandas: 1.2.4
numpy: 1.20.2
scipy: 1.6.3
netCDF4: 1.5.6
pydap: installed
h5netcdf: 0.11.0
h5py: 3.2.1
Nio: None
zarr: 2.8.1
cftime: 1.4.1
nc_time_axis: 1.2.0
PseudoNetCDF: installed
rasterio: 1.2.2
cfgrib: 0.9.9.0
iris: 2.4.0
bottleneck: 1.3.2
dask: 2021.05.0
distributed: 2021.05.0
matplotlib: 3.4.1
cartopy: 0.19.0
seaborn: 0.11.1
numbagg: installed
pint: 0.17
setuptools: 49.6.0.post20210108
pip: 21.1
conda: None
pytest: 6.2.3
IPython: 7.22.0
sphinx: 3.5.4
The text was updated successfully, but these errors were encountered: