Skip to content

Commit 4afdb09

Browse files
fixed test failing due to infinite precision requirement (#153)
1 parent 24947a0 commit 4afdb09

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pymc_experimental/tests/distributions/test_discrete_markov_chain.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def test_logp_with_default_init_dist(self):
9393
chain = DiscreteMarkovChain.dist(P=P, init_dist=x0, steps=3)
9494

9595
logp = pm.logp(chain, [0, 1, 2]).eval()
96-
assert logp == np.log((1 / 3) * 0.5 * 0.3)
96+
assert logp == pytest.approx(np.log((1 / 3) * 0.5 * 0.3), rel=1e-6)
9797

9898
def test_logp_with_user_defined_init_dist(self):
9999
P = pt.as_tensor_variable(np.array([[0.1, 0.5, 0.4], [0.3, 0.4, 0.3], [0.9, 0.05, 0.05]]))

0 commit comments

Comments
 (0)