-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Labels
Description
pymc/pymc/step_methods/hmc/nuts.py
Line 185 in a3cc81c
direction = logbern(np.log(0.5)) * 2 - 1 |
pymc/pymc/step_methods/hmc/nuts.py
Line 303 in a3cc81c
if logbern(size2 - size1): |
pymc/pymc/step_methods/hmc/nuts.py
Line 394 in a3cc81c
if logbern(tree2.log_size - log_size): |
Lines 214 to 217 in 8ed23e0
def logbern(log_p): | |
if np.isnan(log_p): | |
raise FloatingPointError("log_p can't be nan.") | |
return np.log(np.random.uniform()) < log_p |