cupy.random.exponential#

cupy.random.exponential(scale, size=None, dtype=<class 'float'>)[source]#

Exponential distribution.

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

\[f(x) = \frac{1}{\beta}\exp (-\frac{x}{\beta}).\]
Parameters:
  • scale (float or array_like of floats) – The scale parameter \(\beta\).

  • 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 exponential distribution.

Return type:

cupy.ndarray