Skip to content

Commit 3167a58

Browse files
committed
Add float32 xfail to test_rice
1 parent 667e994 commit 3167a58

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

pymc3/tests/test_distributions.py

+10-4
Original file line numberDiff line numberDiff line change
@@ -2544,18 +2544,24 @@ def test_multidimensional_beta_construction(self):
25442544
with Model():
25452545
Beta("beta", alpha=1.0, beta=1.0, size=(10, 20))
25462546

2547+
@pytest.mark.xfail(
2548+
condition=(aesara.config.floatX == "float32"),
2549+
reason="Some combinations underflow to -inf in float32 in pymc version",
2550+
)
25472551
def test_rice(self):
25482552
self.check_logp(
25492553
Rice,
25502554
Rplus,
2551-
{"nu": Rplus, "sigma": Rplusbig},
2552-
lambda value, nu, sigma: sp.rice.logpdf(value, b=nu / sigma, loc=0, scale=sigma),
2555+
{"b": Rplus, "sigma": Rplusbig},
2556+
lambda value, b, sigma: sp.rice.logpdf(value, b=b, loc=0, scale=sigma),
25532557
)
2558+
2559+
def test_rice_nu(self):
25542560
self.check_logp(
25552561
Rice,
25562562
Rplus,
2557-
{"b": Rplus, "sigma": Rplusbig},
2558-
lambda value, b, sigma: sp.rice.logpdf(value, b=b, loc=0, scale=sigma),
2563+
{"nu": Rplus, "sigma": Rplusbig},
2564+
lambda value, nu, sigma: sp.rice.logpdf(value, b=nu / sigma, loc=0, scale=sigma),
25592565
)
25602566

25612567
def test_moyal_logp(self):

0 commit comments

Comments
 (0)