jax.random.maxwell#

jax.random.maxwell(key, shape=(), dtype=<class 'float'>)[source]#

從單邊馬克斯威爾分佈中取樣。

這些值根據機率密度函數分佈

\[f(x) \propto x^2 e^{-x^2 / 2}\]

在定義域 \(0 \le x < \infty\) 上。

參數:
  • key (ArrayLike) – PRNG 金鑰。

  • shape (Shape) – 傳回樣本的形狀。

  • dtype (DTypeLikeFloat) – 用於樣本的型別。

返回:

形狀為 shape 的 jnp.array 樣本。

返回型別:

Array