code: def maskedEqual(array, missingValue):
      
      if array_is_structured(array):
          # Enforce the array to be masked
          if not isinstance(array, ma.MaskedArray):
              array = ma.MaskedArray(array)
  
          # Set the mask separately per field
          for nr, field in enumerate(array.dtype.names):
              if hasattr(missingValue, '__len__'):
                  fieldMissingValue = missingValue[nr]
              else:
                  fieldMissingValue = missingValue
  
              array[field] = ma.masked_equal(array[field], fieldMissingValue)
  
          check_class(array, ma.MaskedArray) # post-condition check
          return array
      else:
          # masked_equal works with missing is None
          result = ma.masked_equal(array, missingValue, copy=False)
          check_class(result, ma.MaskedArray) # post-condition check
          return result
docs: Mask an array where equal to a given (missing)value.
  
          Unfortunately ma.masked_equal does not work with structured arrays. See:
          https://mail.scipy.org/pipermail/numpy-discussion/2011-July/057669.html
  
          If the data is a structured array the mask is applied for every field (i.e. forming a
          logical-and). Otherwise ma.masked_equal is called.