dpnp.random.randn
- dpnp.random.randn(d0, *dn, device=None, usm_type='device', sycl_queue=None)[source]
Return a sample (or samples) from the "standard normal" distribution.
For full documentation refer to
numpy.random.randn
.- Parameters:
device ({None, string, SyclDevice, SyclQueue}, optional) -- An array API concept of device where the output array is created. The device can be
None
(the default), an OneAPI filter selector string, an instance ofdpctl.SyclDevice
corresponding to a non-partitioned SYCL device, an instance ofdpctl.SyclQueue
, or a Device object returned bydpnp.dpnp_array.dpnp_array.device
property.usm_type ({"device", "shared", "host"}, optional) -- The type of SYCL USM allocation for the output array.
sycl_queue ({None, SyclQueue}, optional) -- A SYCL queue to use for output array allocation and copying. The sycl_queue can be passed as
None
(the default), which means to get the SYCL queue from device keyword if present or to use a default queue. Default:None
.
- Returns:
out -- A
(d0, d1, ..., dn)
-shaped array of floating-point samples from the standard normal distribution, or a single such float if no parameters were supplied. Output array data type isdpnp.float64
if device supports it, ordpnp.float32
otherwise.- Return type:
dpnp.ndarray
Examples
>>> dpnp.random.randn() 2.1923875335537315 # random
Two-by-four array of samples from N(3, 6.25):
>>> s = 3 + 2.5 * dpnp.random.randn(2, 4)