Skip to content

Commit

Permalink
Also fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
almarklein committed Mar 29, 2024
1 parent fba8ffd commit 69234f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dash_slicer/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def mask_to_coloured_slices(mask, axis, color=None):
# Check the mask
if not isinstance(mask, np.ndarray):
raise TypeError("Mask must be an ndarray or None.")
elif mask.dtype not in (np.bool, np.uint8):
elif mask.dtype not in (bool, np.uint8):
raise ValueError(f"Mask must have bool or uint8 dtype, not {mask.dtype}.")

mask = mask.astype(np.uint8, copy=False) # need int to index
Expand Down

0 comments on commit 69234f6

Please sign in to comment.