From ba7ef28e9c37c882a79883238b053c9a63dfd8ff Mon Sep 17 00:00:00 2001 From: Martin Fleischmann Date: Fri, 23 Aug 2024 16:52:12 +0200 Subject: [PATCH] use float32 as mask in rasterize (#77) --- xvec/zonal.py | 1 + 1 file changed, 1 insertion(+) diff --git a/xvec/zonal.py b/xvec/zonal.py index 060eff1..eb28a35 100644 --- a/xvec/zonal.py +++ b/xvec/zonal.py @@ -60,6 +60,7 @@ def _zonal_stats_rasterize( transform=transform, fill=np.nan, # type: ignore all_touched=all_touched, + dtype=np.float32, ) groups = acc._obj.groupby(xr.DataArray(labels, dims=(y_coords, x_coords)))