Skip to content

Commit 1ef552a

Browse files
committed
Move check for model and flag into single line as per @colcarrolls's suggestion.
1 parent c0e7cd5 commit 1ef552a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pymc3/distributions/dist_math.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,8 @@ def bound(logp, *conditions, **kwargs):
7171

7272
# If called inside a model context, see if bounds check is disabled
7373
model = modelcontext(kwargs.get("model"))
74-
if model is not None:
75-
if model.disable_bounds_check:
76-
return logp
74+
if model is not None and model.disable_bounds_check:
75+
return logp
7776

7877
broadcast_conditions = kwargs.get("broadcast_conditions", True)
7978

0 commit comments

Comments
 (0)