From 2e50d2df3be79a982eed23ef6ef2aeef8b33363c Mon Sep 17 00:00:00 2001 From: k-dominik Date: Tue, 28 May 2024 08:05:00 +0200 Subject: [PATCH] Remove iinfo for bool array np.iinfo is not implemented for bool type (yet). xref: https://github.com/numpy/numpy/issues/8849 --- _includes/datatypes/inspect_binary_8bit_skimage_napari.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/_includes/datatypes/inspect_binary_8bit_skimage_napari.py b/_includes/datatypes/inspect_binary_8bit_skimage_napari.py index db8fd34c..7e138f37 100644 --- a/_includes/datatypes/inspect_binary_8bit_skimage_napari.py +++ b/_includes/datatypes/inspect_binary_8bit_skimage_napari.py @@ -30,5 +30,6 @@ # - The issue is that boolean type images cannot be saved as such on disk, because e.g. TIFF does not support this datatype binary_image = ( image == 255 ) print(image.shape, binary_image.shape) # ensure we did not mess up the shape -print(np.iinfo(binary_image.dtype)) +# np.iinfo is not implemented for bool +print(binary_image.dtype) print(np.unique(binary_image))