dpnp.random.set_bit_generator

dpnp.random.set_bit_generator(bitgen)[source]

Set the bit generator of the state of the queue of bitgen, which the dpnp.random functions then draw from on that queue.

For full documentation refer to numpy.random.set_bit_generator.

Parameters:
bitgenBitGenerator

The bit generator. It is used itself, not a copy, so the dpnp.random functions and a dpnp.random.Generator of bitgen share its stream.

See also

dpnp.random.get_bit_generator

Return the bit generator of a queue.

Examples

>>> import dpnp as np
>>> bg = np.random.PCG64DXSM(42)
>>> np.random.set_bit_generator(bg)
>>> np.random.get_bit_generator() is bg
True