cupy.random.chisquare#

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

Chi-square distribution.

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

\[f(x) = \frac{(1/2)^{k/2}}{\Gamma(k/2)}x^{k/2-1}e^{-x/2}.\]
Parameters:
  • df (int or array_like of ints) – Degree of freedom \(k\).

  • 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 chi-square distribution.

Return type:

cupy.ndarray