Commit 7b4b5618 authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

MulticanonicalState: fix issue with histogram flat

parent 05becca9
......@@ -485,7 +485,8 @@ class MulticanonicalState(object):
h_mean / h.max())
else:
h /= h.sum()
S = -(h * log(h)).sum()
_h = h[h > 0]
S = -(_h * log(_h)).sum()
return exp(S - log(len(h)))
def get_posterior(self, N=None):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment