code: def replaceMaskedValueWithNan(self):
          
          kind = self.data.dtype.kind
          if kind == 'i' or kind == 'u': # signed/unsigned int
              self.data = self.data.astype(np.float, casting='safe')
  
          if self.data.dtype.kind != 'f':
              return # only replace for floats
  
          if self.mask is False:
              pass
          elif self.mask is True:
              self.data[:] = np.NaN
          else:
              self.data[self.mask] = np.NaN
docs: Replaces values where the mask is True with the replacement value.
  
              Will change the data type to float if the data is an integer.
              If the data is not a float (or int) the function does nothing.