Skip to content

Commit

Permalink
modified survey module to remove numpy DeprecationWarning
Browse files Browse the repository at this point in the history
  • Loading branch information
jonnymaserati committed Nov 12, 2023
1 parent d0a1afc commit c8efa1b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions welleng/survey.py
Original file line number Diff line number Diff line change
Expand Up @@ -1343,6 +1343,9 @@ def _interpolate_survey(survey, x=0, index=0):
2), with the interpolated station between them (index 1)
"""
if isinstance(index, np.ndarray):
index = index[0]

index = int(index)

assert index < len(survey.md) - 1, "Index is out of range"
Expand Down

0 comments on commit c8efa1b

Please sign in to comment.