code: def fill_values_to_nan(masked_array):
      
      if masked_array is not None and masked_array.dtype.kind == 'f':
          check_class(masked_array, ma.masked_array)
          logger.debug("Replacing fill_values by NaNs")
          masked_array[:] = ma.filled(masked_array, np.nan)
          masked_array.set_fill_value(np.nan)
      else:
          return masked_array
docs: Replaces the fill_values of the masked array by NaNs
  
          If the array is None or it does not contain floating point values, it cannot contain NaNs.
          In that case the original array is returned.