code: def load_tiff(file):
      
      ndv, xsize, ysize, geot, projection, datatype = get_geo_info(file)
      data = gdalnumeric.LoadFile(file)
      data = np.ma.masked_array(data, mask=data == ndv, fill_value=ndv)
      return data
docs: Load a geotiff raster keeping ndv values using a masked array
  
      Usage:
              data = load_tiff(file)