You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
zonal_stats function returns infinity when calculating mean for some geometries.
If there's an inf within the portion of the raster delineated by the polygon, that seems mathematically correct.
There is no inf value in the raster.Also, I think inside the main script of rasterstats where mean is being calculated as float(masked.mean()), if it is changed to np.mean(masked.astype('float64')) (as the data type of my raster is float32, the problem vanishes). So, I think this limitation of numpy should be taken careof in the versions to come.
zonal_stats function returns infinity when calculating mean for some geometries.
The text was updated successfully, but these errors were encountered: