Skip to content

Samplers depend on global seeding #5093

Closed
@ricardoV94

Description

@ricardoV94

direction = logbern(np.log(0.5)) * 2 - 1

if logbern(size2 - size1):

if logbern(tree2.log_size - log_size):

pymc/pymc/math.py

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions