Skip to content

Commit

Permalink
Use allclose with tolerance of 1e-12
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewfeickert committed Jan 13, 2021
1 parent 8735ce5 commit ebafa43
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/test_probability.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)


Expand Down

0 comments on commit ebafa43

Please sign in to comment.