Skip to content

Commit 6322ca6

Browse files
committed
revert change to indexing.py, not needed
1 parent 12c3308 commit 6322ca6

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/zarr/core/indexing.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ def err_too_many_indices(selection: Any, shape: ChunkCoords) -> None:
7676
raise IndexError(f"too many indices for array; expected {len(shape)}, got {len(selection)}")
7777

7878

79-
def _zarr_array_to_int_or_bool_array(arr: Array) -> npt.NDArray[np.intp] | npt.NDArray[np.bool_]:
79+
def _zarr_array_to_int_or_bool_array(
80+
arr: Array,
81+
) -> npt.NDArray[np.intp] | npt.NDArray[np.bool_]:
8082
if arr.dtype.kind in ("i", "b"):
8183
return np.asarray(arr)
8284
else:
@@ -1193,7 +1195,7 @@ def __iter__(self) -> Iterator[ChunkProjection]:
11931195
stop = self.chunk_nitems_cumsum[chunk_rix]
11941196
out_selection: slice | npt.NDArray[np.intp]
11951197
if self.sel_sort is None:
1196-
out_selection = np.arange(start, stop)
1198+
out_selection = slice(start, stop)
11971199
else:
11981200
out_selection = self.sel_sort[start:stop]
11991201

@@ -1318,7 +1320,8 @@ def pop_fields(selection: SelectionWithFields) -> tuple[Fields | None, Selection
13181320
fields = fields[0] if len(fields) == 1 else fields
13191321
selection_tuple = tuple(s for s in selection if not isinstance(s, str))
13201322
selection = cast(
1321-
"Selection", selection_tuple[0] if len(selection_tuple) == 1 else selection_tuple
1323+
"Selection",
1324+
selection_tuple[0] if len(selection_tuple) == 1 else selection_tuple,
13221325
)
13231326
return fields, selection
13241327

0 commit comments

Comments
 (0)