Skip to content

Commit daf3469

Browse files
Ignore numpy warnings in TestSkellam
1 parent 741134a commit daf3469

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

pymc_experimental/tests/distributions/test_discrete.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,10 @@ class TestSkellam:
199199
def test_logp(self):
200200
# Scipy Skellam underflows to -inf earlier than PyMC
201201
Rplus_small = Domain([0, 0.01, 0.1, 0.9, 0.99, 1, 1.5, 2, 10, np.inf])
202-
check_logp(
203-
Skellam,
204-
I,
205-
{"mu1": Rplus_small, "mu2": Rplus_small},
206-
lambda value, mu1, mu2: scipy.stats.skellam.logpmf(value, mu1, mu2),
207-
)
202+
with np.errstate(divide="ignore", invalid="ignore"):
203+
check_logp(
204+
Skellam,
205+
I,
206+
{"mu1": Rplus_small, "mu2": Rplus_small},
207+
lambda value, mu1, mu2: scipy.stats.skellam.logpmf(value, mu1, mu2),
208+
)

0 commit comments

Comments
 (0)