diff --git a/scipy/interpolate/tests/test_rgi.py b/scipy/interpolate/tests/test_rgi.py index 9a0bec0975a5..95b5e2253031 100644 --- a/scipy/interpolate/tests/test_rgi.py +++ b/scipy/interpolate/tests/test_rgi.py @@ -983,7 +983,11 @@ def test_matrix_input(self, method): v1 = interpn((x, y), values, sample, method=method) v2 = interpn((x, y), np.asarray(values), sample, method=method) - assert_allclose(v1, v2) + if method == "quintic": + # https://github.com/scipy/scipy/issues/20472 + assert_allclose(v1, v2, atol=5e-5, rtol=2e-6) + else: + assert_allclose(v1, v2) def test_length_one_axis(self): # gh-5890, gh-9524 : length-1 axis is legal for method='linear'.