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

Wald distribution.

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

\[f(x) = \sqrt{\frac{\lambda}{2\pi x^3}}\ e^{\frac{-\lambda(x-\mu)^2}{2\mu^2x}}.\]
  • mean (float) – Parameter of the wald distribution \(\mu\).

  • scale (float) – Parameter of the wald distribution \(\lambda\).

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


Samples drawn from the wald distribution.

Return type


See also

cupy.random.RandomState.wald() numpy.random.wald