code: def b_getma(b):
      
      b_ndv = get_ndv_b(b)
      #bma = np.ma.masked_equal(b.ReadAsArray(), b_ndv)
      #This is more appropriate for float, handles precision issues
      bma = np.ma.masked_values(b.ReadAsArray(), b_ndv)
      return bma
docs: Get masked array from input GDAL Band
  
      Parameters
      ----------
      b : gdal.Band 
          Input GDAL Band 
      
      Returns
      -------
      np.ma.array    
          Masked array containing raster values