From b122c2aa171de7f3b1fa09dabeda770bf252dff3 Mon Sep 17 00:00:00 2001 From: Mike Jarvis Date: Thu, 27 Jun 2024 01:51:56 -0400 Subject: [PATCH] Slightly loosen test that is too tight for some systems --- tests/test_zernike.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_zernike.py b/tests/test_zernike.py index beeeeb359a..5a11d7b838 100644 --- a/tests/test_zernike.py +++ b/tests/test_zernike.py @@ -390,7 +390,7 @@ def Z11_grad(x, y): # fig.colorbar(scat2, ax=axes[2]) # plt.show() - np.testing.assert_allclose(Z11.evalCartesianGrad(x, y), Z11_grad(x, y), rtol=0, atol=1e-12) + np.testing.assert_allclose(Z11.evalCartesianGrad(x, y), Z11_grad(x, y), rtol=1.e-12, atol=1e-12) Z28 = Zernike([0]*28+[1]) @@ -400,7 +400,7 @@ def Z28_grad(x, y): grady = -6*np.sqrt(14)*y*(5*x**4 - 10*x**2*y**2 + y**4) return gradx, grady - np.testing.assert_allclose(Z28.evalCartesianGrad(x, y), Z28_grad(x, y), rtol=0, atol=1e-12) + np.testing.assert_allclose(Z28.evalCartesianGrad(x, y), Z28_grad(x, y), rtol=1.e-12, atol=1e-12) # Now try some finite differences on a broader set of input