standard_exponential#
- class brainstate.random.standard_exponential(size=None, key=None, dtype=None)#
Draw samples from the standard exponential distribution.
standard_exponential is identical to the exponential distribution with a scale parameter of 1.
- Parameters:
size (
int|Sequence[int] |integer|Sequence[integer] |None) – Output 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.key (
int|Array|ndarray|None) – The key for the random number generator. If not given, the default random number generator is used.
- Returns:
out – Drawn samples.
- Return type:
float or ndarray
Examples
Output a 3x8000 array:
>>> n = brainstate.random.standard_exponential((3, 8000))