Skip to content
Snippets Groups Projects
Commit 6a4e39f3 authored by leufen1's avatar leufen1
Browse files

force numpy array to be float to use nans

parent 2e517c11
No related branches found
No related tags found
2 merge requests!5New App; stable_night_lights,!4Lukas issue004 feat new app stable night lights
......@@ -36,7 +36,7 @@ def read_proxydata(filename, dummy=DEBUG and USE_DUMMY_STABLE_NIGHT_LIGHTS_DATA)
dlon, dlat = rst.scale # xscale=dlon, yscale=dlat
# construct data array and lonvec, latvec
data = rst.bands[0].data()
data = rst.bands[0].data().astype(np.float)
nodata_value = rst.bands[0].nodata_value
data[data == nodata_value] = np.nan
lonvec = np.linspace(xmin, xmax, cols)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment