pyxpcm.stat.quantile¶
-
pyxpcm.stat.
quantile
(ds, q=0.5, of=None, using='PCM_LABELS', outname='PCM_QUANT', keep_attrs=False)[source]¶ Compute q-th quantile of a
xarray.DataArray
for each PCM componentsParameters: - q: float in the range of [0,1] (or sequence of floats)
Quantiles to compute, which must be between 0 and 1 inclusive.
- of: str
Name of the
xarray.Dataset
variable to compute quantiles for.- using: str
Name of the
xarray.Dataset
variable with classification labels to use. Use ‘PCM_LABELS’ by default.- outname: ‘PCM_QUANT’ or str
Name of the
xarray.DataArray
with quantile- keep_attrs: boolean, False by default
Preserve
of
xarray.Dataset
attributes or not in the new quantile variable.
Returns: xarray.Dataset
with shape (K, n_quantiles, N_z=n_features)- or
xarray.DataArray
with shape (K, n_quantiles, N_z=n_features)