dpnp.random.seed

dpnp.random.seed(seed=None, *, device=None, sycl_queue=None)[source]

Reseed the state of a queue.

For full documentation refer to numpy.random.seed.

Parameters:
%(queue)s

Notes

A bit generator set by dpnp.random.set_bit_generator() other than dpnp.random.Philox4x3210 is reseeded in place with the state a new one of its type would have for seed, as in NumPy.

The states made later for other queues are seeded from seed too, in the order they are made, so that seeded code draws the same values on every run.

Examples

>>> import dpnp as np
>>> np.random.seed(42)
>>> a = np.random.rand(3)
>>> np.random.seed(42)
>>> bool((np.random.rand(3) == a).all())
True