cunumeric.random.zipf#

cunumeric.random.zipf(a, size=None)#

Draw samples from a Zipf distribution.

Samples are drawn from a Zipf distribution with specified parameter a > 1.

The Zipf distribution (also known as the zeta distribution) is a discrete probability distribution that satisfies Zipf’s law: the frequency of an item is inversely proportional to its rank in a frequency table.

Parameters:
  • a (float) – Distribution parameter. Must be greater than 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. Default is None, in which case a single value is returned.

Returns:

out – Drawn samples from the parameterized Zipf distribution.

Return type:

ndarray or scalar

Availability:

Multiple GPUs, Multiple CPUs