Skip to content

Commit

Permalink
Merge pull request #25 from Deltares/numpy2-compat
Browse files Browse the repository at this point in the history
Fix np.unique API change, np.cross deprecation
  • Loading branch information
Huite authored Jul 16, 2024
2 parents d9e197e + a275c39 commit 1d8b824
Show file tree
Hide file tree
Showing 5 changed files with 2,934 additions and 1,629 deletions.
1 change: 1 addition & 0 deletions pandamesh/triangle_geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ def add_linestrings(linestrings: gpd.GeoSeries) -> Tuple[FloatArray, IntArray]:
# If the geometry is closed (LinearRings), the final vertex of every
# feature is discarded, since the repeats will segfault Triangle.
vertices, inverse = np.unique(vertices, return_inverse=True, axis=0)
inverse = inverse.ravel()
segments = inverse[segments]

return vertices, segments
Expand Down
Loading

0 comments on commit 1d8b824

Please sign in to comment.