dpnp.random.rand

dpnp.random.rand(*args, dtype=None, device=None, usm_type=None, sycl_queue=None)[source]

Random values in a given shape, from a uniform distribution over [0, 1).

For full documentation refer to numpy.random.rand.

Parameters:
%(dtype)s
%(queue)s
%(usm)s

Examples

>>> import dpnp as np
>>> x = np.random.rand(3, 2)
>>> x.shape
(3, 2)
>>> bool(((x >= 0) & (x < 1)).all())
True