bundles / numpy 2.5.0.dev0+git20251130.2de293a / numpy / random / _generator / Generator / standard_exponential
cython_function_or_method
numpy.random._generator:Generator.standard_exponential
Summary
Draw samples from the standard exponential distribution.
Extended Summary
standard_exponential is identical to the exponential distribution with a scale parameter of 1.
Parameters
size: int or tuple of ints, optionalOutput shape. If the given shape is, e.g.,
(m, n, k), thenm * n * ksamples are drawn. Default is None, in which case a single value is returned.dtype: dtype, optionalDesired dtype of the result, only float64 and float32 are supported. Byteorder must be native. The default value is np.float64.
method: str, optionalEither 'inv' or 'zig'. 'inv' uses the default inverse CDF method. 'zig' uses the much faster Ziggurat method of Marsaglia and Tsang.
out: ndarray, optionalAlternative output array in which to place the result. If size is not None, it must have the same shape as the provided size and must match the type of the output values.
Returns
out: float or ndarrayDrawn samples.
Examples
Output a 3x8000 array:rng = np.random.default_rng() n = rng.standard_exponential((3, 8000))✓
Aliases
-
numpy.random.Generator.standard_exponential