Skip to content

Commit a3d3509

Browse files
Change to avoid branch to fix decrease in coverage
1 parent d58cba5 commit a3d3509

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

dpctl/tensor/_manipulation_functions.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,8 +372,7 @@ def roll(X, /, shift, *, axis=None):
372372
shape = X.shape
373373
for sh, ax in broadcasted:
374374
n_i = shape[ax]
375-
if n_i > 0:
376-
shifts[ax] = int(shifts[ax] + sh) % int(n_i)
375+
shifts[ax] = int(shifts[ax] + sh) % int(n_i) if n_i > 0 else 0
377376
res = dpt.empty(
378377
X.shape, dtype=X.dtype, usm_type=X.usm_type, sycl_queue=exec_q
379378
)

0 commit comments

Comments
 (0)