Skip to content

Commit

Permalink
Add float32 xfail to test_rice
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardoV94 committed May 17, 2021
1 parent 3e7bf7f commit ca17e38
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions pymc3/tests/test_distributions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2531,18 +2531,25 @@ def test_multidimensional_beta_construction(self):
with Model():
Beta("beta", alpha=1.0, beta=1.0, size=(10, 20))

@pytest.mark.xfail(
condition=(aesara.config.floatX == "float32"),
reason="Some combinations underflow to -inf in float32 in pymc version",
)
def test_rice(self):
self.check_logp(
Rice,
Rplus,
{"nu": Rplus, "sigma": Rplusbig},
lambda value, nu, sigma: sp.rice.logpdf(value, b=nu / sigma, loc=0, scale=sigma),
{"b": Rplus, "sigma": Rplusbig},
lambda value, b, sigma: sp.rice.logpdf(value, b=b, loc=0, scale=sigma),
)

def test_rice_nu(self):
self.check_logp(
Rice,
Rplus,
{"b": Rplus, "sigma": Rplusbig},
lambda value, b, sigma: sp.rice.logpdf(value, b=b, loc=0, scale=sigma),
{"nu": Rplus, "sigma": Rplusbig},
lambda value, nu, sigma: sp.rice.logpdf(value, b=nu / sigma, loc=0, scale=sigma),
n_samples=-1,
)

def test_moyal_logp(self):
Expand Down

0 comments on commit ca17e38

Please sign in to comment.