Skip to content

Commit b213cf3

Browse files
Fix test_weibull_logp flakyness
1 parent 26f7636 commit b213cf3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pymc/tests/distributions/test_continuous.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,10 +618,13 @@ def test_pareto(self):
618618
reason="Fails on float32 due to numerical issues",
619619
)
620620
def test_weibull_logp(self):
621+
# SciPy has new (?) precision issues at {alpha=20, beta=2, x=100}
622+
# We circumvent it by skipping alpha=20:
623+
rplusbig = Domain([0, 0.5, 0.9, 0.99, 1, 1.5, 2, np.inf])
621624
check_logp(
622625
pm.Weibull,
623626
Rplus,
624-
{"alpha": Rplusbig, "beta": Rplusbig},
627+
{"alpha": rplusbig, "beta": Rplusbig},
625628
lambda value, alpha, beta: st.exponweib.logpdf(value, 1, alpha, scale=beta),
626629
)
627630

0 commit comments

Comments
 (0)