cupy.random.default_rng#

cupy.random.default_rng(seed=None)[source]#

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

Parameters:

seed (None, int, array_like[ints], numpy.random.SeedSequence, cupy.random.BitGenerator, cupy.random.Generator, optional) – A seed to initialize the cupy.random.BitGenerator. If an int or array_like[ints] or None is passed, then it will be passed to numpy.random.SeedSequence to detive the initial BitGenerator state. One may also pass in a SeedSequence instance. Adiditionally, when passed :class:`BitGenerator, it will be wrapped by Generator. If passed a Generator, it will be returned unaltered.

Returns:

The initialized generator object.

Return type:

Generator