code: def mask(self, mask):
          
          check_class(mask, (np.ndarray, bool, np.bool_))
          if isinstance(mask, (bool, np.bool_)):
              self._mask = bool(mask)
          else:
              self._mask = mask
docs: The mask values. Must be an array or a boolean scalar.