Skip to content

Commit 951929f

Browse files
authored
Merge pull request #25 from greschd/maint/numpy_2_compatibility
Replace 'asfarray' with 'asarray' for numpy 2.0 compatibility
2 parents 4e7b633 + 9d601fe commit 951929f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fatpack/endurance.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def wrapped_method(self, x):
1717
if x_is_float_or_int:
1818
xm = np.array([x])
1919
else:
20-
xm = np.asfarray(x)
20+
xm = np.asarray(x, dtype=float)
2121
ym = method(self, xm)
2222
if x_is_float_or_int:
2323
ym = ym[0]
@@ -123,7 +123,7 @@ def find_miner_sum(self, S):
123123
124124
"""
125125

126-
Sr = np.asfarray(S)
126+
Sr = np.asarray(S, dtype=float)
127127
shape = Sr.shape
128128
if len(shape) == 1:
129129
miner_sum = np.sum(1. / self.get_endurance(Sr))

0 commit comments

Comments
 (0)