File <redacted>/python3.10/site-packages/wsireg/reg_images/tifffile_reg_image.py:46, in TiffFileRegImage.__init__(self, image_fp, image_res, mask, pre_reg_transforms, preprocessing, channel_names, channel_colors)
42 self._get_dim_info()
44 self._dask_image = self._get_dask_image()
---> 46 if mask:
47 self._mask = self.read_mask(mask)
49 self.pre_reg_transforms = pre_reg_transforms
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
The fix is simple: check if mask is None: instead of if mask:.
When passing a boolean mask to
add_modality
(which is supported according to the type hints) usingIt failed with
The fix is simple: check
if mask is None:
instead ofif mask:
.