mtalg.random.standard_exponential
- standard_exponential(size: int | tuple | None = None, dtype=<class 'numpy.float64'>, method: str = 'zig') ndarray | Number[source]
Draw from a standard exponential distribution.
- Parameters:
size – Output shape.
dtype – Dtype of output array.
method – Either ‘inv’ or ‘zig’. ‘inv’ uses the inverse CDF method. ‘zig’ uses the much faster Ziggurat method of Marsaglia and Tsang.
- Returns:
numpy.ndarray or scalar.