Skip to content

Commit

Permalink
Merge pull request #130 from Fraser-Birks/fix_np_asscalar_bug
Browse files Browse the repository at this point in the history
BUG: Removed np.asscalar()
  • Loading branch information
jameskermode authored Dec 30, 2022
2 parents 87904b4 + 9d8aa09 commit e37a51f
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 e37a51f

Please sign in to comment.