rng
Functions for standardized number generation.
Module Contents
Functions
|
Create a seed from the current time in microseconds. |
|
Convert a string seed to an integer seed. |
|
Create a numpy random number generator from a seed. |
|
Create a numpy random number generator from a seed. |
- seed_from_time(log_seed: bool = True) int
Create a seed from the current time in microseconds.
- Parameters:
log_seed – If the seed should be logged. It probably should.
- Returns:
The created seed.
- seed_from_string(text: str) int
Convert a string seed to an integer seed.
- Parameters:
text – The seed as string.
- Returns:
The seed as integer.
- make_rng(seed: int) numpy.random.Generator
Create a numpy random number generator from a seed.
- Parameters:
seed – The seed to use.
- Returns:
The random number generator.
- make_rng_time_seed(log_seed: bool = True) numpy.random.Generator
Create a numpy random number generator from a seed.
- Parameters:
log_seed – If the automatically created seed should be logged. It probably should.
- Returns:
The random number generator.