Skip to content

Generator

bitgenerator instance-attribute

bitgenerator: np.random.BitGenerator

bitgenerator_class instance-attribute

bitgenerator_class: type[np.random.BitGenerator]

__init__

__init__(
    seed: int | None = None,
    bitgenerator_class: type[np.random.BitGenerator]
    | None = None,
)

Initialize a random number generator.

Parameters:

  • seed (int or None, default: None ) –

    For reproducibility, provide a seed. If no seed is provided, a random seed is provided by the operating system and generally the results will be different every time you reseed.

  • bitgenerator_class (type[BitGenerator], default: None ) –

    This is the class used to create new BitGenerator objects when the seed is reset.

get_normal

get_normal() -> float

Return a random draw from a standard normal distribution.

get_uniform

get_uniform() -> float

Return a random draw standard uniform distribution.

seed

seed(seed: int | list[int] | None) -> None

Reseed the random bit generator.