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
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
[Any
,str
,dtype
,SupportsDType
]) – The type used for samples.
- Return type
- Returns
A jnp.array of samples.