mkl_random.MKLRandomState.standard_normal

MKLRandomState.standard_normal(size=None, method='ICDF')

Draw samples from a standard Normal distribution (mean=0, stdev=1).

Parameters:
sizeint or tuple of ints, optional

Output shape. If the given shape is, e.g., (m, n, k), then m * n * k samples are drawn. Default is None, in which case a single value is returned.

method‘ICDF, ‘BoxMuller’, ‘BoxMuller2’, optional

Sampling method used by Intel MKL. Can also be specified using tokens mkl_random.ICDF, mkl_random.BOXMULLER, mkl_random.BOXMULLER2

Returns:
outfloat or ndarray

Drawn samples.

Examples

>>> s = mkl_random.standard_normal(8000)
>>> s
array([ 0.6888893 ,  0.78096262, -0.89086505, ...,  0.49876311, #random
       -0.38672696, -0.4685006 ])                               #random
>>> s.shape
(8000,)
>>> s = mkl_random.standard_normal(size=(3, 4, 2))
>>> s.shape
(3, 4, 2)