mxnet.np.random.exponential

exponential(scale=1.0, size=None, device=None, out=None)

Draw samples from an exponential distribution.

Parameters
  • scale (float or array_like of floats) – The scale parameter, \(\beta = 1/\lambda\). Must be non-negative.

  • 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. If size is None (default), a single value is returned if scale is a scalar. Otherwise, np.array(scale).size samples are drawn.

  • device (Device, optional) – Device context of output, default is current device.

  • out (ndarray, optional) – Store output to an existing ndarray.

Returns

out – Drawn samples from the parameterized exponential distribution.

Return type

ndarray or scalar