pymor.tools.random
¶
Module Contents¶
- pymor.tools.random.default_random_state(seed=42)[source]¶
Returns the default
NumPy
RandomState
.Parameters
- seed
Seed to use for initializing the random state.
Returns
The default
RandomState
object.
- pymor.tools.random.get_random_state(random_state=None, seed=None)[source]¶
Returns a
NumPy
RandomState
.Parameters
- random_state
If specified, this state is returned.
- seed
If specified, the seed to initialize a new random state.
Returns
Either the provided, a newly created or the default
RandomState
object.