Skip to content

Commit

Permalink
fixed multinomial_mode error on zero-probabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
btwied committed Feb 13, 2017
1 parent 19ac4f9 commit 4a8f2ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gameanalysis/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ def multinomial_mode(p, n):
notation follows: Gall 2003. Determination of the modes of a Multinomial
distribution.
"""
f = p * (n + p.size/2)
f = (p + _TINY) * (n + p.size/2)
k = f.astype(int)
f -= k
n0 = k.sum()
Expand Down

0 comments on commit 4a8f2ac

Please sign in to comment.