xorbits.numpy.random.standard_exponential#
- xorbits.numpy.random.standard_exponential(size=None)[source]#
Draw samples from the standard exponential distribution.
standard_exponential is identical to the exponential distribution with a scale parameter of 1.
Note
New code should use the
standard_exponentialmethod of adefault_rng()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 – Drawn samples.
- Return type
float or ndarray
See also
random.Generator.standard_exponentialwhich should be used for new code.
Examples
Output a 3x8000 array:
>>> n = np.random.standard_exponential((3, 8000))
This docstring was copied from numpy.random.