-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Slice by 0-dimensional np.array #3406
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
Comments
Still an issue in dask 1.2.0 |
Also observing this in dask 2.6.0. |
If someone is able to fix this, that would be welcome. |
Hi Dask team, please could I take this issue on for Hacktoberfest 2021? If so, I will put up a PR shortly, aiming to have it up within the next few days. (I just want to check nobody is working on it already.) FYI, I have checked and the deficiency at hand is still present with the latest $ conda list | grep dask
dask 2021.10.0 dev_0 <develop> >>> import numpy as np
>>> import dask.array as da
>>> a = da.arange(2, chunks=2)
>>> idx = np.array(0)
>>> a[idx]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/sadie/dask/dask/array/core.py", line 1800, in __getitem__
dsk, chunks = slice_array(out, self.name, self.chunks, index2, self.itemsize)
File "/home/sadie/dask/dask/array/slicing.py", line 174, in slice_array
dsk_out, bd_out = slice_with_newaxes(out_name, in_name, blockdims, index, itemsize)
File "/home/sadie/dask/dask/array/slicing.py", line 196, in slice_with_newaxes
dsk, blockdims2 = slice_wrap_lists(out_name, in_name, blockdims, index2, itemsize)
File "/home/sadie/dask/dask/array/slicing.py", line 252, in slice_wrap_lists
return slice_slices_and_integers(out_name, in_name, blockdims, index)
File "/home/sadie/dask/dask/array/slicing.py", line 305, in slice_slices_and_integers
assert all(isinstance(ind, (slice, Integral)) for ind in index)
AssertionError |
As of the current git head:
The text was updated successfully, but these errors were encountered: