nlcpy.random.RandomState.exponential
- RandomState.exponential(self, scale=1.0, size=None)
Draws samples from an exponential distribution.
Its probability density function is
f(x; \frac{1}{\beta}) = \frac{1}{\beta} \exp(-\frac{x}{\beta}),
for
x > 0and 0 elsewhere. \beta is the scale parameter, which is the inverse of the rate parameter \lambda = 1/\beta.- Parameters:
- scalefloat
The scale parameter, \beta = 1/\lambda. Must be non-negative.
- sizeint or tuple of ints, optional
Output shape. If the given shape is, e.g.,
(m, n, k), thenm * n * ksamples are drawn.
- Returns:
- outndarray
Drawn samples from the parameterized exponential distribution.
Restriction
If scale is neither a scalar nor None : NotImplementedError occurs.