xorbits.numpy.random.standard_exponential#

xorbits.numpy.random.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.

备注

New code should use the ~numpy.random.Generator.standard_exponential method of a ~numpy.random.Generator instance instead; please see the random-quick-start.

参数

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.

返回

out – Drawn samples.

返回类型

float or ndarray

参见

random.Generator.standard_exponential

which should be used for new code.

实际案例

Output a 3x8000 array:

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

This docstring was copied from numpy.random.