finam.data.masks_compatible#

finam.data.masks_compatible(this, incoming, incoming_donwstream, this_grid=None, incoming_grid=None)[source]#

Check if an incoming mask is compatible with a given mask.

Parameters:
  • this (Mask value or valid boolean mask for Masked arrays or None) – mask specification to check against

  • incoming (Mask value or valid boolean mask for Masked arrays or None) – incoming mask to check for compatibility

  • incoming_donwstream (bool) – Whether the incoming mask is from downstream data

  • this_grid (Grid or NoGrid or None, optional) – grid for first mask (to check shape and value equality)

  • incoming_grid (Grid or NoGrid or None, optional) – grid for second mask (to check shape and value equality)

Returns:

mask compatibility

Return type:

bool