mlx.core.random.gumbel

目录

mlx.core.random.gumbel#

gumbel(shape: Sequence[int] = [], dtype: Dtype | None = float32, key: array | None = None, stream: None | Stream | Device = None) array#

Sample from the standard Gumbel distribution.

The values are sampled from a standard Gumbel distribution which CDF exp(-exp(-x)).

参数:
  • shape (list(int)) -- The shape of the output.

  • dtype (Dtype, optional) -- The data type of the output. Default: float32.

  • key (array, optional) -- A PRNG key. Default: None.

返回:

The array with shape shape and distributed according to the Gumbel distribution.

返回类型:

array