mtalg.random.zipf

zipf(a: Number, size: int | tuple | None = None) ndarray | Number[source]

Draw from a Zipf distribution.

Parameters:
  • a – Distribution parameter. Must be greater than 1.

  • size – Output shape.

Returns:

numpy.ndarray or scalar.