Skip to content

Commit

Permalink
Merge pull request #63 from Deltares/fix/utils_60_61
Browse files Browse the repository at this point in the history
Fix/utils 60 61

Former-commit-id: c16be68
  • Loading branch information
kdberends authored Oct 1, 2023
2 parents 7132ebf + 4e09a24 commit 7477bab
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions docs/CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## v2.2.6 (2023-10-01)

- Fixed an issue where irregular station names like `MA_67.00Z` caused a sorting error in `utils.Compare1D2D`

## v2.2.5 (2023-07-28)

- FM2PROF now validates the "SkipMaps" parameter and throws error if its value is larger than the available number of maps
Expand Down
6 changes: 3 additions & 3 deletions fm2prof/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1729,8 +1729,8 @@ def get_route(

# sort data
sorted_indices = np.argsort(routekms)
sorted_stations = [stations[i] for i in sorted_indices]
sorted_rkms = [routekms[i] for i in sorted_indices]
sorted_stations = [stations[i] for i in sorted_indices if routekms[i] is not np.nan]
sorted_rkms = [routekms[i] for i in sorted_indices if routekms[i] is not np.nan]

# sort lmw stations
lmw_stations = [
Expand Down Expand Up @@ -2348,7 +2348,7 @@ def _catch_e(
try:
return func(*args, **kwargs)
except exception as e:
return None
return np.nan


class Network1D:
Expand Down

0 comments on commit 7477bab

Please sign in to comment.