Skip to content

Commit

Permalink
BUG: Removed np.asscalar()
Browse files Browse the repository at this point in the history
np.asscalar no longer works since numpy 1.23.0
  • Loading branch information
Fraser-Birks committed Dec 28, 2022
1 parent d0052dc commit 9d8aa09
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions matscipy/fracture_mechanics/crack.py
Original file line number Diff line number Diff line change
Expand Up @@ -1876,8 +1876,8 @@ def find_tip_coordination(a, bondlength=2.6, bulk_nn=4):
a.set_array('above', above)
a.set_array('below', below)

bond1 = np.asscalar(above.nonzero()[0][a.positions[above, 0].argmax()])
bond2 = np.asscalar(below.nonzero()[0][a.positions[below, 0].argmax()])
bond1 = above.nonzero()[0][a.positions[above, 0].argmax()]
bond2 = below.nonzero()[0][a.positions[below, 0].argmax()]

# These need to be ints, otherwise they are no JSON serializable.
a.info['bond1'] = bond1
Expand Down

0 comments on commit 9d8aa09

Please sign in to comment.