cupy.random.rayleigh

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

Rayleigh distribution.

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

\[f(x) = \frac{x}{\sigma^2}e^{\frac{-x^2}{2-\sigma^2}}, x \ge 0.\]
Parameters:
  • scale (array) – Parameter of the rayleigh distribution \(\sigma\).
  • 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 rayleigh distribution.

Return type:

cupy.ndarray

See also

numpy.random.rayleigh