From 7f2458e452180488ded78c58d7410e10bb9370ef Mon Sep 17 00:00:00 2001 From: viknesh-ai Date: Tue, 25 Aug 2026 22:03:31 +0530 Subject: [PATCH] Migrate tests/test_mmparray.py from npt.assert_almost_equal to npt.assert_allclose --- tests/test_mmparray.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/test_mmparray.py b/tests/test_mmparray.py index e18239df4..52c4055b6 100644 --- a/tests/test_mmparray.py +++ b/tests/test_mmparray.py @@ -18,10 +18,10 @@ def test_mmparray_mstump(T, m): excl_zone = int(np.ceil(m / 4)) ref_P, ref_I = naive.mstump(T, m, excl_zone) - comp = mstump(T, m) + cmp = mstump(T, m) - npt.assert_almost_equal(ref_P, comp.P_) - npt.assert_almost_equal(ref_I, comp.I_) + npt.assert_allclose(cmp.P_, ref_P, atol=1.5e-07) + npt.assert_allclose(cmp.I_, ref_I, atol=1.5e-07) @pytest.mark.parametrize("T, m", test_data) @@ -30,7 +30,7 @@ def test_mmparray_maamp(T, m): for p in [1.0, 2.0, 3.0]: ref_P, ref_I = naive.maamp(T, m, excl_zone, p=p) - comp = maamp(T, m, p=p) + cmp = maamp(T, m, p=p) - npt.assert_almost_equal(ref_P, comp.P_) - npt.assert_almost_equal(ref_I, comp.I_) + npt.assert_allclose(cmp.P_, ref_P, atol=1.5e-07) + npt.assert_allclose(cmp.I_, ref_I, atol=1.5e-07)