cupy.random.laplace

cupy.random.laplace(loc=0.0, scale=1.0, size=None, dtype=<class 'float'>)[source]

Laplace distribution.

Returns an array of samples drawn from the laplace distribution. Its probability density function is defined as

\[f(x) = \frac{1}{2b}\exp\left(-\frac{|x-\mu|}{b}\right).\]
Parameters:
  • loc (float) – The location of the mode \(\mu\).
  • scale (float) – The scale parameter \(b\).
  • size (int or tuple of ints) – The shape of the array. If None, a zero-dimensional array is generated.
  • dtype – Data type specifier. Only numpy.float32 and numpy.float64 types are allowed.
Returns:

Samples drawn from the laplace distribution.

Return type:

cupy.ndarray

See also

numpy.random.laplace