cupy.random.zipf

cupy.random.zipf(a, size=None, dtype=<class 'int'>)[source]

Zipf distribution.

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

\[f(x) = \frac{x^{-a}}{ \zeta (a)},\]

where \(\zeta\) is the Riemann Zeta function.

Parameters:
  • a (float) – Parameter of the beta distribution \(a\).
  • 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.int32 and numpy.int64 types are allowed.
Returns:

Samples drawn from the Zipf distribution.

Return type:

cupy.ndarray

See also

numpy.random.zipf()