Skip to content

Commit

Permalink
Fix check_logcdf test regression
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardoV94 authored and twiecki committed Jun 5, 2021
1 parent 8ce7f76 commit 93caab9
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions pymc3/tests/test_distributions.py
Original file line number Diff line number Diff line change
Expand Up @@ -815,8 +815,14 @@ def check_logcdf(
)

# Test that method works with multiple values or raises informative TypeError
with pytest.raises(TypeError), aesara.config.change_flags(mode=Mode("py")):
logcdf(valid_dist, np.array([valid_value, valid_value])).eval()
valid_dist = change_rv_size(valid_dist, 2)
with aesara.config.change_flags(mode=Mode("py")):
try:
logcdf(valid_dist, np.array([valid_value, valid_value])).eval()
except TypeError as err:
assert str(err).endswith(
"logcdf expects a scalar value but received a 1-dimensional object."
)

def check_selfconsistency_discrete_logcdf(
self, distribution, domain, paramdomains, decimal=None, n_samples=100
Expand Down

0 comments on commit 93caab9

Please sign in to comment.