Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
twiecki committed Dec 19, 2016
1 parent 1d26d79 commit 1927867
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pymc3/distributions/dist_math.py
Expand Up @@ -10,15 +10,15 @@

from .special import gammaln, multigammaln

def bound(logp, *conditions, broadcast_conditions=True):
def bound(logp, *conditions, **kwargs):
"""
Bounds a log probability density with several conditions.
Parameters
----------
logp : float
*conditions : booleans
broadcast_conditions : bool (optional)
broadcast_conditions : bool (optional, default=True)
If True, broadcasts logp to match the largest shape of the conditions.
This is used e.g. in DiscreteUniform where logp is a scalar constant and the shape
is specified via the conditions.
Expand All @@ -29,6 +29,8 @@ def bound(logp, *conditions, broadcast_conditions=True):
-------
logp with elements set to -inf where any condition is False
"""
broadcast_conditions = kwargs.get('broadcast_conditions', True)

if broadcast_conditions:
alltrue = alltrue_elemwise
else:
Expand Down

0 comments on commit 1927867

Please sign in to comment.