Describe the bug
The integerize_1d function using the "weighted_random" methodology has a stochastic element that must be controlled through a random seed and generator as well as by ensuring the data it is being applied to has a consistent order. The current implementation in #98 did not add explicit sorts before usage of the integerize_1d function.
To Reproduce
See annual_cycle.py and calculate_population.py.
Expected behavior
Data passed to integerize_1d should be explicitly sorted.
Potential resolution
Explicitly sort prior to passing into integerize_1d.
Describe the bug
The
integerize_1dfunction using the "weighted_random" methodology has a stochastic element that must be controlled through a random seed and generator as well as by ensuring the data it is being applied to has a consistent order. The current implementation in #98 did not add explicit sorts before usage of theintegerize_1dfunction.To Reproduce
See
annual_cycle.pyandcalculate_population.py.Expected behavior
Data passed to
integerize_1dshould be explicitly sorted.Potential resolution
Explicitly sort prior to passing into
integerize_1d.