flopscope.

flopscope.numpy.random.RandomState.standard_exponential

fnp.random.RandomState.standard_exponential(self, size=None)

Draw samples from the standard exponential distribution.

Arearandom
Typecounted
Cost
numel(output)\text{numel}(\text{output})
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), then m * n * k samples are drawn. Default is None, in which case a single value is returned.

Returns

out:float or ndarray

Drawn samples.

See also

Examples

Output a 3x8000 array:

>>> n = flops.random.standard_exponential((3, 8000))