We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ec8ea71 commit 45e8c25Copy full SHA for 45e8c25
zarr/indexing.py
@@ -829,18 +829,14 @@ def pop_fields(selection):
829
return fields, selection
830
831
832
-def int_to_slice(dim_selection):
833
- return slice(dim_selection, dim_selection + 1, 1)
834
-
835
836
def make_slice_selection(selection):
837
ls = []
838
for dim_selection in selection:
839
if is_integer(dim_selection):
840
- ls.append(int_to_slice(dim_selection))
+ ls.append(slice(dim_selection, dim_selection + 1, 1))
841
elif isinstance(dim_selection, np.ndarray):
842
if len(dim_selection) == 1:
843
- ls.append(int_to_slice(dim_selection[0]))
+ ls.append(slice(dim_selection[0], dim_selection[0] + 1, 1))
844
else:
845
raise ArrayIndexError()
846
0 commit comments