Skip to content

Commit f0677c2

Browse files
Unnecessary comprehension (#899)
1 parent 70bd394 commit f0677c2

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

zarr/indexing.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -961,10 +961,8 @@ def __init__(self, selection, arr_shape):
961961
# any selection can not be out of the range of the chunk
962962
selection_shape = np.empty(self.arr_shape)[tuple(selection)].shape
963963
if any(
964-
[
965-
selection_dim < 0 or selection_dim > arr_dim
966-
for selection_dim, arr_dim in zip(selection_shape, self.arr_shape)
967-
]
964+
selection_dim < 0 or selection_dim > arr_dim
965+
for selection_dim, arr_dim in zip(selection_shape, self.arr_shape)
968966
):
969967
raise IndexError(
970968
"a selection index is out of range for the dimension"

0 commit comments

Comments
 (0)