lyman.utils.check_mask¶
-
lyman.utils.
check_mask
(mask, data)[source]¶ Check the dtype and shape of a mask array.
This will raise a TypeError if
mask
is not boolean or a ValueError if the shape of the mask does not match the first (n - 1) dimensions of the data.- Parameters
- maskboolean numpy array
Mask array to validate.
- datanumpy array
Data that the mask will index into.