Skip to content

Commit cb01997

Browse files
committed
Allow tiny difference in test_bootstrap::fit_and_test_three_permutations.
1 parent a657dd8 commit cb01997

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

test/test_bootstrap.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@ def fit_and_test_three_permutations(estimator, X, Y):
3434
ll_3 = estimator.score(X, Y) # Average log-likelihood
3535
preds_3 = estimator.predict_proba(X, Y) # Class predictions
3636

37-
assert ll_1 == ll_2 == ll_3 # Likelihoods should be invariant
37+
# Likelihoods should be invariant
38+
assert np.isclose(ll_1, ll_2, atol=1e-12, rtol=0.0)
39+
assert np.isclose(ll_1, ll_3, atol=1e-12, rtol=0.0)
40+
assert np.isclose(ll_2, ll_3, atol=1e-12, rtol=0.0)
41+
3842
assert not np.all(
3943
preds_1 == preds_2
4044
) # Second permutation should have different posterior

0 commit comments

Comments
 (0)