Skip to content

Commit

Permalink
Merge pull request #27 from xylar/fix-bisect-for-numpy-2.0
Browse files Browse the repository at this point in the history
Fix `np.unique()` calls for numpy 2.0
  • Loading branch information
dengwirda authored Jul 1, 2024
2 parents d9d70e6 + 5786963 commit 5729a38
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions jigsawpy/bisect.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,9 @@ def bisect(mesh):
return_index=True,
return_inverse=True, axis=0)

# for numpy 2.x compatibility
erev = erev.ravel()

edge = edge[efwd, :]

if (quad.size != 0):
Expand All @@ -216,6 +219,9 @@ def bisect(mesh):
return_index=True,
return_inverse=True, axis=0)

# for numpy 2.x compatibility
qrev = qrev.ravel()

quad = quad[qfwd, :]

if (hexa.size != 0):
Expand All @@ -224,6 +230,9 @@ def bisect(mesh):
return_index=True,
return_inverse=True, axis=0)

# for numpy 2.x compatibility
hrev = hrev.ravel()

hexa = hexa[hfwd, :]

#------------------------------ map unique joins to elements
Expand Down

0 comments on commit 5729a38

Please sign in to comment.