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_statscalls eithernumpy.quantileornumpy.nanquantileand ensures the added dimension is the last one for compatibility withxarray.apply_ufuncwhen using it as part of theDataArrayinterface.- Parameters:
- aryarray_like
- quantile
floator array_like - axis
intor sequence ofintorNone, 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