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

Usage:
        data = load_tiff(file)