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.DataArrayfor 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.Datasetvariable to compute quantiles for.- using: str
Name of the
xarray.Datasetvariable with classification labels to use. Use ‘PCM_LABELS’ by default.- outname: ‘PCM_QUANT’ or str
Name of the
xarray.DataArraywith quantile- keep_attrs: boolean, False by default
Preserve
ofxarray.Datasetattributes or not in the new quantile variable.
Returns: xarray.Datasetwith shape (K, n_quantiles, N_z=n_features)- or
xarray.DataArraywith shape (K, n_quantiles, N_z=n_features)