flopscope.numpy.random.RandomState.standard_exponential
fnp.random.RandomState.standard_exponential(self, size=None)
Draw samples from the standard exponential distribution.
Adapted from NumPy docs np.random.RandomState.standard_exponential
Cost
Flopscope Context
Legacy standard exponential; cost = numel(output).
standard_exponential is identical to the exponential distribution
with a scale parameter of 1.
Note.
New code should use the standard_exponential method of a Generator instance instead; please see the random-quick-start.
Parameters
- size:int or tuple of ints, optional
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.
Returns
- out:float or ndarray
Drawn samples.
See also
- we.flops.random.Generator.standard_exponential which should be used for new code.
Examples
Output a 3x8000 array:
>>> n = flops.random.standard_exponential((3, 8000))