Skip to content

Commit

Permalink
Merge pull request #25 from greschd/maint/numpy_2_compatibility
Browse files Browse the repository at this point in the history
Replace 'asfarray' with 'asarray' for numpy 2.0 compatibility
  • Loading branch information
Gunnstein authored Jun 28, 2024
2 parents 4e7b633 + 9d601fe commit 951929f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fatpack/endurance.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def wrapped_method(self, x):
if x_is_float_or_int:
xm = np.array([x])
else:
xm = np.asfarray(x)
xm = np.asarray(x, dtype=float)
ym = method(self, xm)
if x_is_float_or_int:
ym = ym[0]
Expand Down Expand Up @@ -123,7 +123,7 @@ def find_miner_sum(self, S):
"""

Sr = np.asfarray(S)
Sr = np.asarray(S, dtype=float)
shape = Sr.shape
if len(shape) == 1:
miner_sum = np.sum(1. / self.get_endurance(Sr))
Expand Down

0 comments on commit 951929f

Please sign in to comment.