Skip to content

Commit 5729a38

Browse files
authored
Merge pull request #27 from xylar/fix-bisect-for-numpy-2.0
Fix `np.unique()` calls for numpy 2.0
2 parents d9d70e6 + 5786963 commit 5729a38

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

jigsawpy/bisect.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,9 @@ def bisect(mesh):
208208
return_index=True,
209209
return_inverse=True, axis=0)
210210

211+
# for numpy 2.x compatibility
212+
erev = erev.ravel()
213+
211214
edge = edge[efwd, :]
212215

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

222+
# for numpy 2.x compatibility
223+
qrev = qrev.ravel()
224+
219225
quad = quad[qfwd, :]
220226

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

233+
# for numpy 2.x compatibility
234+
hrev = hrev.ravel()
235+
227236
hexa = hexa[hfwd, :]
228237

229238
#------------------------------ map unique joins to elements

0 commit comments

Comments
 (0)