mlx.core.random.gumbel# gumbel(shape: Sequence[int] = [], dtype: Dtype | None = float32, key: None | Stream | Device = None, stream: array | None = None) → array# 从标准 Gumbel 分布中采样。 采样值来自标准 Gumbel 分布,其 CDF(累积分布函数)为 exp(-exp(-x))。 参数: shape (list(int)) – 输出的形状。 dtype (Dtype, optional) – 输出的数据类型。默认值:float32。 key (array, optional) – PRNG 密钥。默认值:None。 返回: 返回具有 shape 形状且符合 Gumbel 分布的 array。 返回类型: array