jax.random.double_sided_maxwell#
- jax.random.double_sided_maxwell(key, loc, scale, shape=(), dtype=<class 'float'>)[source]#
Sample from a double sided Maxwell distribution.
The values are distributed according to the probability density function:
\[f(x;\mu,\sigma) \propto z^2 e^{-z^2 / 2}\]where \(z = (x - \mu) / \sigma\), with the center \(\mu\) specified by
loc
and the scale \(\sigma\) specified byscale
.- Parameters:
key (ArrayLike) – a PRNG key.
loc (RealArray) – The location parameter of the distribution.
scale (RealArray) – The scale parameter of the distribution.
shape (Shape) – The shape added to the parameters loc and scale broadcastable shape.
dtype (DTypeLikeFloat) – The type used for samples.
- Returns:
A jnp.array of samples.
- Return type: