dpnp.random.RandomState.normal¶
method
- RandomState.normal(loc=0.0, scale=1.0, size=None, dtype=None, usm_type='device')[source]¶
Draw random samples from a normal (Gaussian) distribution.
For full documentation refer to
numpy.random.RandomState.normal.- Parameters:
- usm_type{"device", "shared", "host"}, optional
The type of SYCL USM allocation for the output array.
Default:
"device".
- Returns:
- outdpnp.ndarray
Drawn samples from the parameterized normal distribution. Output array data type is the same as input dtype. If dtype is
None(the default),dpnp.float64type will be used if device supports it, ordpnp.float32otherwise.
Limitations
Parameters loc and scale are supported as a scalar. Otherwise,
numpy.random.RandomState.normal(loc, scale, size)samples are drawn. Parameter dtype is supported only asdpnp.float32,dpnp.float64orNone.Examples
>>> s = dpnp.random.RandomState().normal(loc=3.7, scale=2.5, size=(2, 4)) >>> print(s) [[ 1.58997253 -0.84288406 2.33836967 4.16394577] [ 4.40882036 5.39295758 6.48927254 6.74921661]]