Skip to content

Commit

Permalink
Fix division throwing error in some cases
Browse files Browse the repository at this point in the history
  • Loading branch information
msorvoja committed Dec 3, 2024
1 parent 060c2a0 commit fd0cb2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eis_toolkit/vector_processing/idw_interpolation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit fd0cb2f

Please sign in to comment.