arviz_stats.base.array_stats.quantile#
- array_stats.quantile(ary, quantile, axis=-1, method='linear', skipna=False, weights=None)#
Compute the quantile of an array of samples.
Implementation wise, the version in
arviz_stats.base.array_stats
calls eithernumpy.quantile
ornumpy.nanquantile
and ensures the added dimension is the last one for compatibility withxarray.apply_ufunc
when using it as part of theDataArray
interface.- Parameters:
- aryarray_like
- quantile
float
or array_like - axis
int
or sequence ofint
orNone
, default -1 - method
str
, default “linear” - skipnabool, default
False
- weightsarray_like, optional
Array with the same shape as a with the weights associated to the values of a.
Notes
Should default to NumPy’s “linear” method, which corresponds to type 7 from H&F [1].
References
[1]R. J. Hyndman and Y. Fan, “Sample quantiles in statistical packages,” The American Statistician, 50(4), pp. 361-365, 1996