mdbartos / pysheds

:earth_americas: Simple and fast watershed delineation in python.
GNU General Public License v3.0
702 stars 188 forks source link

Facing problem when nodata_out = np.nan as default in functions #226

Open debpal opened 10 months ago

debpal commented 10 months ago

pysheds module is a great module and thanks to the team. I am facing some problem with the argument 'nodata_out' and don't understand that how to solve it. Some functions set nodata_out as None (fill_pits) whereas some functions set nodata_out as np.nan (e..g, fill_depressions). Generally, I replace the nodata value by float("nan") for plotting the raster to visualize it. When the default value of nodata_out is np.nan, I cannot replace the nodata value and get only black and white raster during plotting. Is there any special purpose to set nodata_out as np.nan? Any crever way to solve it? A screenshot is attached for my problem. Capture