diff --git a/rasters/raster.py b/rasters/raster.py index 4b2f1f4..5975ab0 100644 --- a/rasters/raster.py +++ b/rasters/raster.py @@ -1218,6 +1218,8 @@ def IDW(self, geometry: VectorGeometry, power: float = 2) -> Union[float, gpd.Ge # Calculate the interpolated value using weighted summation result = np.nansum(weighted) / np.nansum(weight) + result = result.item() + # Return the result based on the input geometry type if isinstance(geometry, SingleVectorGeometry): return result