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
locand the scale \(\sigma\) specified byscale.- Parameters:
key (
Union[Array,ndarray,bool_,number,bool,int,float,complex]) – a PRNG key.loc (
Union[Array,ndarray,bool_,number,bool,int,float,complex]) – The location parameter of the distribution.scale (
Union[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 (
Union[str,type[Any],dtype,SupportsDType]) – The type used for samples.
- Return type:
- Returns:
A jnp.array of samples.