cunumeric.random.chisquare#

cunumeric.random.chisquare(df, size=None)#

Draw samples from a chi-square distribution.

When df independent random variables, each with standard normal distributions (mean 0, variance 1), are squared and summed, the resulting distribution is chi-square. This distribution is often used in hypothesis testing.

Parameters:
  • df (float) – Number of degrees of freedom, must be > 0.

  • size (int or tuple of ints, optional) – Output shape. If the given shape is, e.g., (m, n, k), then m * n * k samples are drawn. If size is None (default), a single value is returned.

Returns:

out – Drawn samples from the parameterized chi-square distribution.

Return type:

ndarray or scalar

Raises:

ValueError – When df <= 0 or when an inappropriate size (e.g. size=-1) is given.

Availability:

Multiple GPUs, Multiple CPUs