From 8cf15b651f0ed2056a8da69bee1e9a68bd499571 Mon Sep 17 00:00:00 2001 From: Fabian Joswig Date: Thu, 6 Oct 2022 17:55:04 +0100 Subject: [PATCH] tests: num_grad fit test improved. --- tests/fits_test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/fits_test.py b/tests/fits_test.py index 9c43e375..698acd26 100644 --- a/tests/fits_test.py +++ b/tests/fits_test.py @@ -90,8 +90,8 @@ def test_fit_num_grad(): x.append(i * 0.01) y.append(pe.pseudo_Obs(i * 0.01, 0.0001, "ens")) - num = pe.fits.least_squares(x, y, lambda a, x: a[0] * np.exp(x) + a[1], num_grad=True) - auto = pe.fits.least_squares(x, y, lambda a, x: a[0] * anp.exp(x) + a[1], num_grad=False) + num = pe.fits.least_squares(x, y, lambda a, x: np.exp(a[0] * x) + a[1], num_grad=True) + auto = pe.fits.least_squares(x, y, lambda a, x: anp.exp(a[0] * x) + a[1], num_grad=False) assert(num[0] == auto[0]) assert(num[1] == auto[1])