cunumeric.random.negative_binomial#

cunumeric.random.negative_binomial(n, p, size=None)#

Draw samples from a negative binomial distribution.

Samples are drawn from a negative binomial distribution with specified parameters, n successes and p probability of success where n is > 0 and p is in the interval (0, 1].

Parameters:
  • n (int) – Parameter of the distribution, > 0.

  • p (float) – Parameter of the distribution, > 0 and <=1.

  • 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 negative binomial distribution, where each sample is equal to N, the number of failures that occurred before a total of n successes was reached.

Return type:

ndarray or scalar

Availability:

Multiple GPUs, Multiple CPUs