From 5e7d3489b23d1c070ca4b8c5adf1f344b8a42a18 Mon Sep 17 00:00:00 2001 From: Bill Engels Date: Tue, 27 Sep 2022 18:05:51 -0700 Subject: [PATCH] use a .05 relative tolerance instead of absolute --- pymc/tests/gp/test_util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pymc/tests/gp/test_util.py b/pymc/tests/gp/test_util.py index 52568b6a09..43213bf987 100644 --- a/pymc/tests/gp/test_util.py +++ b/pymc/tests/gp/test_util.py @@ -59,11 +59,11 @@ def setup_method(self): def test_kmeans(self): X = self.x[:, None] Xu = pm.gp.util.kmeans_inducing_points(2, X).flatten() - npt.assert_allclose(np.asarray(self.centers), np.sort(Xu), atol=0.1) + npt.assert_allclose(np.asarray(self.centers), np.sort(Xu), rtol=0.05) X = at.as_tensor_variable(self.x[:, None]) Xu = pm.gp.util.kmeans_inducing_points(2, X).flatten() - npt.assert_allclose(np.asarray(self.centers), np.sort(Xu), atol=0.1) + npt.assert_allclose(np.asarray(self.centers), np.sort(Xu), rtol=0.05) def test_kmeans_raises(self): with pytest.raises(TypeError):