cupy.random.logseries

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

Log series distribution.

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

\[f(x) = \frac{-p^x}{x\ln(1-p)}.\]
Parameters
  • p (float) – Parameter of the log series distribution \(p\).

  • 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 log series distribution.

Return type

cupy.ndarray

See also

numpy.random.logseries