diff --git a/changelog_entry.yaml b/changelog_entry.yaml index e69de29b..82712183 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -0,0 +1,4 @@ +- bump: patch + changes: + fixed: + - Removed the possibility of a negative seed in random() within commons/formulas.py by removing the multiplication by 100 diff --git a/policyengine_core/commons/formulas.py b/policyengine_core/commons/formulas.py index 4695cf9c..48997c5a 100644 --- a/policyengine_core/commons/formulas.py +++ b/policyengine_core/commons/formulas.py @@ -332,7 +332,7 @@ def random(population): values = np.array( [ np.random.default_rng( - seed=id * 100 + population.simulation.count_random_calls + seed=id + population.simulation.count_random_calls ).random() for id in entity_ids ]