XrRV.rvs¶
- XrRV.rvs(*args, size=None, random_state=None, dims=None, coords=None, apply_kwargs=None, **kwargs)[source]¶
Method wrapping
.rvs
of the input distribution withxarray.apply_ufunc
Usage examples available at Probability distributions.
- Parameters:
- *argsscalar or array_like or
xarray.DataArray
, optional Passed to the scipy distribution after broadcasting.
- size
int
of sequence ofint
, optional The number of samples to draw per array element. If the distribution parameters broadcast to a
(4, 10, 6)
shape andsize=(5, 3)
then the output shape is(5, 3, 4, 10, 6)
. This differs from the scipy implementation. Here, all broadcasting and alignment is done for you, you give the dimensions the right names, and broadcasting just happens. Ifsize
followed scipy behaviour, you’d be forced to broadcast to provide a valid value which would defeat thexarray_einstats
goal of handling all alignment and broadcasting for you.- random_state
int
ornp.Generator
, optional Passed as is to the wrapped scipy distribution
- dimshashable or sequence of hashable, optional
Dimension names for the dimensions created due to
size
. If present it must have the same length assize
.- coordsmapping of {hashablearray_like or
xarray.DataArray
}, optional Mapping of coordinate name to coordinate values.
- apply_kwargs
dict
, optional Passed to
xarray.apply_ufunc
- **kwargs
Passed to the scipy distribution after broadcasting using the same key.
- *argsscalar or array_like or
- Returns:
See also