as_random_state¶
-
probnum.utils.as_random_state(seed)[source]¶ Turn
seedinto a np.random.RandomState instance.- Parameters
seed (
Union[None,int,RandomState,Generator]) – If seed is None, return the RandomState singleton used by np.random. If seed is an int, return a new RandomState instance seeded with seed. If seed is already a RandomState instance, return it.- Raises
ValueError – If seed is neither None, an int or a RandomState instance.
- Return type
Union[RandomState,Generator]