mxnet.np.random.laplace

laplace(loc=0.0, scale=1.0, size=None, dtype=None, device=None, out=None)

Draw random samples from a Laplace distribution.

Samples are distributed according to a Laplace distribution parametrized by loc (mean) and scale (the exponential decay).

Parameters
  • loc (float, The position of the distribution peak.) –

  • scale (float, the exponential decay.) –

  • size (int 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.

  • dtype ({'float16', 'float32', 'float64'}, optional) – Data type of output samples. Default is ‘float32’

  • device (Device, optional) – Device context of output. Default is current device.

  • out (ndarray, optional) – Store output to an existing ndarray.

Returns

out – Drawn samples from the parameterized Laplace distribution.

Return type

ndarray