XrContinuousRV

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

Wrapper for subclasses of rv_continuous.

Usage examples available at Intro to the stats module

Examples

Evaluate the ppf of a Student-T distribution from DataArrays that need broadcasting:

from xarray_einstats import tutorial
from xarray_einstats.stats import XrContinuousRV
from scipy import stats
ds = tutorial.generate_mcmc_like_dataset(3)
dist = XrContinuousRV(stats.t, 3, ds["mu"], ds["sigma"])
dist.ppf([.1, .5, .6])
<xarray.DataArray (quantile: 3, chain: 4, draw: 10, team: 6)> Size: 6kB
-3.796 -3.516 -2.506 -1.706 -3.562 -3.648 ... 0.7499 0.9269 1.166 0.9678 0.7404
Coordinates:
  * quantile  (quantile) float64 24B 0.1 0.5 0.6
  * chain     (chain) int64 32B 0 1 2 3
  * draw      (draw) int64 80B 0 1 2 3 4 5 6 7 8 9
  * team      (team) <U1 24B 'a' 'b' 'c' 'd' 'e' 'f'

Methods

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

XrContinuousRV.cdf(*args[, apply_kwargs])

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

XrContinuousRV.isf(*args[, apply_kwargs])

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

XrContinuousRV.logcdf(*args[, apply_kwargs])

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

XrContinuousRV.logpdf(*args[, apply_kwargs])

Method wrapping scipy.stats.rv_continuous.logpdf with xarray.apply_ufunc

XrContinuousRV.logsf(*args[, apply_kwargs])

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

XrContinuousRV.pdf(*args[, apply_kwargs])

Method wrapping scipy.stats.rv_continuous.pdf with xarray.apply_ufunc

XrContinuousRV.ppf(*args[, apply_kwargs])

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

XrContinuousRV.rvs(*args[, size, ...])

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

XrContinuousRV.sf(*args[, apply_kwargs])

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