Skip to content

Commit 5c9bc5e

Browse files
Apply ruff/refurb rule FURB110
FURB110 Replace ternary `if` expression with `or` operator
1 parent 840a3f7 commit 5c9bc5e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/zarr/core/indexing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1129,7 +1129,7 @@ def __init__(
11291129
chunks_multi_index_broadcast = np.broadcast_arrays(*chunks_multi_index)
11301130

11311131
# remember shape of selection, because we will flatten indices for processing
1132-
sel_shape = selection_broadcast[0].shape if selection_broadcast[0].shape else (1,)
1132+
sel_shape = selection_broadcast[0].shape or (1,)
11331133

11341134
# flatten selection
11351135
selection_broadcast = tuple(dim_sel.reshape(-1) for dim_sel in selection_broadcast)
@@ -1150,7 +1150,7 @@ def __init__(
11501150
else:
11511151
sel_sort = None
11521152

1153-
shape = selection_broadcast[0].shape if selection_broadcast[0].shape else (1,)
1153+
shape = selection_broadcast[0].shape or (1,)
11541154

11551155
# precompute number of selected items for each chunk
11561156
chunk_nitems = np.bincount(chunks_raveled_indices, minlength=nchunks)

0 commit comments

Comments
 (0)