Skip to content

Commit af97394

Browse files
authored
Fix multinomial support for p=0
Closes #3050
1 parent 7b5cd32 commit af97394

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pymc3/distributions/multivariate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ def logp(self, x):
584584
p = self.p
585585

586586
return bound(
587-
factln(n) + tt.sum(-factln(x) + x * tt.log(p), axis=-1, keepdims=True),
587+
factln(n) + tt.sum(-factln(x) + logpow(p, x), axis=-1, keepdims=True),
588588
tt.all(x >= 0),
589589
tt.all(tt.eq(tt.sum(x, axis=-1, keepdims=True), n)),
590590
tt.all(p <= 1),

0 commit comments

Comments
 (0)