Question: python check if array is masked?
Answer: You can check explicitly if it is a masked array by isinstance(arr, np. ma. MaskedArray) , or you can check for the attributes hasattr(arr, 'mask') .