diff --git a/eis_toolkit/vector_processing/idw_interpolation.py b/eis_toolkit/vector_processing/idw_interpolation.py index afcaced0..5432926b 100644 --- a/eis_toolkit/vector_processing/idw_interpolation.py +++ b/eis_toolkit/vector_processing/idw_interpolation.py @@ -67,7 +67,7 @@ def _idw_core(x, y, z, xi, yi: np.ndarray, power: Number, search_radius: Optiona over += z[n] / dist under += 1.0 / dist - interpolated_values = over / under + interpolated_values = np.divide(over, under, out=np.full_like(over, np.nan), where=under != 0) return interpolated_values