class xarray_einstats.stats.XrRV(dist, *args, **kwargs)[source]#

Base random variable wrapper class.

Most methods have a common signature between continuous and discrete variables in scipy. We define a base wrapper and then subclass it to add the specific methods like pdf or pmf.


One of the main goals of this library is ease of maintenance. We could wrap each distribution to preserve call signatures and avoid different behaviour between passing input arrays as args or kwargs, but so far we don’t consider what we’d won doing this to be worth the extra maintenance burden.


XrRV.__init__(dist, *args, **kwargs)

XrRV.cdf(*args[, apply_kwargs])

Method wrapping scipy.stats.rv_generic.cdf with xarray.apply_ufunc

XrRV.isf(*args[, apply_kwargs])

Method wrapping scipy.stats.rv_generic.isf with xarray.apply_ufunc

XrRV.logcdf(*args[, apply_kwargs])

Method wrapping scipy.stats.rv_generic.logcdf with xarray.apply_ufunc

XrRV.logsf(*args[, apply_kwargs])

Method wrapping scipy.stats.rv_generic.logsf with xarray.apply_ufunc

XrRV.ppf(*args[, apply_kwargs])

Method wrapping scipy.stats.rv_generic.ppf with xarray.apply_ufunc

XrRV.rvs(*args[, size, random_state, dims, ...])

Method wrapping scipy.stats.rv_discrete.rvs with xarray.apply_ufunc

XrRV.sf(*args[, apply_kwargs])

Method wrapping scipy.stats.rv_generic.sf with xarray.apply_ufunc