Skip to content

Commit 4b600da

Browse files
Prevent infinite loop in _determine_shape
1 parent a7814b1 commit 4b600da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bioimageio/core/prediction.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ def _determine_shape(min_shape, step, axes):
356356
min_len = 64 if is3d else 256
357357
shape = []
358358
for ax, min_ax, step_ax in zip(axes, min_shape, step):
359-
if ax in "zyx":
359+
if ax in "zyx" and step_ax > 0:
360360
len_ax = min_ax
361361
while len_ax < min_len:
362362
len_ax += step_ax

0 commit comments

Comments
 (0)