Skip to content

Commit 9fcd850

Browse files
committed
Test less extreme values in Skellam due to scipy imprecisions
1 parent b500403 commit 9fcd850

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pymc_experimental/tests/distributions/test_discrete.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,11 @@ def test_logp(self):
197197

198198
class TestSkellam:
199199
def test_logp(self):
200+
# Scipy Skellam underflows to -inf earlier than PyMC
201+
Rplus_small = Domain([0, 0.01, 0.1, 0.9, 0.99, 1, 1.5, 2, 10, np.inf])
200202
check_logp(
201203
Skellam,
202204
I,
203-
{"mu1": Rplus, "mu2": Rplus},
205+
{"mu1": Rplus_small, "mu2": Rplus_small},
204206
lambda value, mu1, mu2: scipy.stats.skellam.logpmf(value, mu1, mu2),
205207
)

0 commit comments

Comments
 (0)