Skip to content

Commit 4b05000

Browse files
committed
Add check for 1D fancy index (no tuple)
1 parent 1024db9 commit 4b05000

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

zarr/indexing.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@ def is_pure_fancy_indexing(selection, ndim):
6969
True if the selection is a pure fancy indexing expression (ie not mixed
7070
with boolean or slices).
7171
"""
72+
if ndim == 1:
73+
if is_integer_list(selection) or is_integer_array(selection):
74+
return True
75+
# if not, we go through the normal path below, because a 1-tuple
76+
# of integers is also allowed.
7277
no_slicing = (
7378
isinstance(selection, tuple)
7479
and len(selection) == ndim

0 commit comments

Comments
 (0)