Skip to content

Commit 3d60435

Browse files
slevangdcherian
andauthored
Apply suggestions from code review
Co-authored-by: Deepak Cherian <dcherian@users.noreply.github.com>
1 parent a2d26c8 commit 3d60435

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/zarr/core/indexing.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -967,9 +967,10 @@ def __iter__(self) -> Iterator[ChunkProjection]:
967967
# handle advanced indexing arrays orthogonally
968968
if self.is_advanced:
969969
# NumPy can handle a single array-indexed dimension directly,
970-
# which keeps slice dimensions as slices and avoids an
970+
# which preserves full slices and avoids an
971971
# unnecessary advanced-indexing copy. Integer-indexed
972972
# dimensions still need the ix_ path for downstream squeezing.
973+
# Example: we skip `ix_` for array[:, :, [1, 2, 3]]
973974
n_array_dims = sum(isinstance(sel, np.ndarray) for sel in chunk_selection)
974975

975976
if n_array_dims > 1 or self.drop_axes:

0 commit comments

Comments
 (0)