Skip to content

Commit

Permalink
fix(downsample): check num_mips is not none before comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
william-silversmith committed Feb 11, 2024
1 parent 0b42897 commit 3f0ef78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion igneous/task_creation/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ def ds_shape(mip, chunk_size=None, factor=None):
memory_target, vol.dtype, shape, factor
)

if viable_mips < num_mips:
if num_mips is not None and viable_mips < num_mips:
raise ValueError(
f"Memory limit ({memory_target} bytes) too low to "
"compute {num_mips} mips at a time. {viable_mips} mips possible.")
Expand Down

0 comments on commit 3f0ef78

Please sign in to comment.