cupy.random.rayleigh#

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

瑞利分布。

返回从瑞利分布中抽取的样本数组。其概率密度函数定义为

\[f(x) = \frac{x}{\sigma^2}e^{\frac{-x^2}{2-\sigma^2}}, x \ge 0.\]
参数:
  • scale (array) – 瑞利分布的参数 \(\sigma\)

  • size (inttuple of ints) – 数组的形状。如果为 None,则生成一个零维数组。

  • dtype – 数据类型说明符。只允许 numpy.float32numpy.float64 类型。

返回:

从瑞利分布中抽取的样本。

返回类型:

cupy.ndarray