From ebafa43d72ea6c962b3983a7b6cbfccf9f19be8c Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Tue, 12 Jan 2021 23:28:48 -0600 Subject: [PATCH] Use allclose with tolerance of 1e-12 --- tests/test_probability.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/test_probability.py b/tests/test_probability.py index 07507549de..ed95444eb9 100644 --- a/tests/test_probability.py +++ b/tests/test_probability.py @@ -69,8 +69,10 @@ def test_independent(backend): p1 = probability.Poisson(tb.astensor([10.0])).log_prob(tb.astensor(2.0)) p2 = probability.Poisson(tb.astensor([10.0])).log_prob(tb.astensor(3.0)) - assert tb.tolist(probability.Simultaneous._joint_logpdf([p1, p2]))[0] == tb.tolist( - result + assert np.allclose( + tb.tolist(probability.Simultaneous._joint_logpdf([p1, p2]))[0], + tb.tolist(result), + atol=1e-12, )