Skip to content

Commit 36c7553

Browse files
authored
Fix Poisson logcdf (#5307)
1 parent c94355f commit 36c7553

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

pymc/distributions/discrete.py

+4-6
Original file line numberDiff line numberDiff line change
@@ -635,12 +635,10 @@ def logcdf(value, mu):
635635
safe_mu = at.switch(at.lt(mu, 0), 0, mu)
636636
safe_value = at.switch(at.lt(value, 0), 0, value)
637637

638-
res = (
639-
at.switch(
640-
at.lt(value, 0),
641-
-np.inf,
642-
at.log(at.gammaincc(safe_value + 1, safe_mu)),
643-
),
638+
res = at.switch(
639+
at.lt(value, 0),
640+
-np.inf,
641+
at.log(at.gammaincc(safe_value + 1, safe_mu)),
644642
)
645643

646644
return check_parameters(res, 0 <= mu, msg="mu >= 0")

0 commit comments

Comments
 (0)