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 (Array | ndarray | bool_ | number | bool | int | float | complex) – a PRNG key.
loc (Array | ndarray | bool_ | number | bool | int | float | complex) – The location parameter of the distribution.
scale (Array | ndarray | bool_ | number | bool | int | float | complex) – The scale parameter of the distribution.
shape (Sequence[int]) – The shape added to the parameters loc and scale broadcastable shape.
dtype (str | type[Any] | dtype | SupportsDType) – The type used for samples.
- Returns:
A jnp.array of samples.
- Return type: