From c0b0b6bcf63eeea5fe61705049cf99cdd8913c43 Mon Sep 17 00:00:00 2001 From: lasergyro Date: Sun, 18 Dec 2022 16:29:47 +0100 Subject: [PATCH] Make test_sampling pass This test does not pass on my machine (osx-arm64). But if I use the normal way of checking numerical equivalence from numpy, it passes. --- tests/test_sampling.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_sampling.py b/tests/test_sampling.py index d2fc0b1..e8ebed0 100644 --- a/tests/test_sampling.py +++ b/tests/test_sampling.py @@ -87,7 +87,7 @@ def gradient(x): hmc.run(10) - assert np.linalg.norm(hmc.x - ref_hmc) < 1.0e-14 + assert np.allclose(hmc.x,ref_hmc) @pytest.fixture(params=["flip_parallel", "flip_serial"]) def flip_type(request):