Deal consistently with Raster.data.mask=False
#505
Labels
enhancement
Feature improvement or request
Raster.data.mask=False
#505
The mask of a masked array can be just
False
and not an array ofFalse
when there is no nodata. This can lead to some problems in functions.The function
geoutils.raster.array.get_mask
circumvents that issue by usingnp.isfinite(array)
on the array if the mask is not an array, but that requires the array (which we wouldn't have necessarily loaded, see #502) and mostly more CPU usage.We should have a consistent way to deal with this, maybe something similar to what is done in
raster_equal
here:geoutils/geoutils/raster/raster.py
Line 988 in d0cd168
Or a "good practice" from the NumPy documentation?
The text was updated successfully, but these errors were encountered: