cunumeric.random.default_rng#

cunumeric.random.default_rng(seed: int | BitGenerator | Generator | None = None) Generator#

Construct a new Generator with the default BitGenerator (XORWOW).

Parameters:

seed ({None, int, BitGenerator, Generator}, optional) – A seed to initialize the BitGenerator. If None, then fresh, unpredictable entropy will be pulled from the OS. Additionally, when passed a BitGenerator, it will be wrapped by Generator. If passed a Generator, it will be returned unaltered.

Returns:

The initialized generator object.

Return type:

Generator

Notes

If seed is not a BitGenerator or a Generator, a new BitGenerator is instantiated. This function does not manage a default global instance.

Availability:

Multiple GPUs, Multiple CPUs