randomgen.mtrand.RandomState.standard_exponential¶
- RandomState.standard_exponential(size=None)¶
Draw samples from the standard exponential distribution.
standard_exponential is identical to the exponential distribution with a scale parameter of 1.
- Parameters
- sizeint or tuple of ints, optional
Output shape. If the given shape is, e.g.,
(m, n, k)
, thenm * n * k
samples are drawn. Default is None, in which case a single value is returned.
- Returns
- outfloat or ndarray
Drawn samples.
Examples
Output a 3x8000 array:
>>> n = np.random.standard_exponential((3, 8000))