Skip to content

Commit 4576c13

Browse files
fix FutureWarning& make todo for future pytest (#113)
1 parent f330de1 commit 4576c13

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: src/diffpy/srmise/baselines/polynomial.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def estimate_parameters(self, r, y):
105105
import numpy.linalg as la
106106

107107
a = np.array([r[cut_idx]]).T
108-
slope = la.lstsq(a, y[cut_idx])[0][0]
108+
slope = la.lstsq(a, y[cut_idx], rcond=-1)[0][0]
109109
return np.array([slope, 0.0])
110110
except Exception as e:
111111
emsg = "Error during estimation -- " + str(e)
@@ -256,4 +256,5 @@ def getmodule(self):
256256
y = -r + 10 * np.exp(-((r - 5) ** 2)) + np.random.rand(len(r))
257257
est = f.estimate_parameters(r, y)
258258
print("Actual baseline: ", np.array([-1, 0.0]))
259+
# TODO: Make test est baseline in ways of tolerance function
259260
print("Estimated baseline: ", est)

0 commit comments

Comments
 (0)