xdas.percentile#
- xdas.percentile(da, q, dim=None, *, skipna=True, **kwargs)[source]#
Compute the q-th percentile of the data along the specified dimension.
- Parameters:
da (DataArray) – Input data.
q (float or array-like of floats) – Percentile(s) to compute, between 0 and 100 inclusive.
dim (str, optional) – Dimension along which the percentile is computed. If None, the percentile of the flattened array is returned. Default is None.
skipna (bool, optional) – Whether to exclude NaN values (True) or include them (False) in the computation. Default is True.
**kwargs – Additional keyword arguments passed to the NumPy function.
- Returns:
q-th percentile(s) of the data along the specified dimension. If dim is None, a single scalar value is returned; if dim is specified, the result has the same shape as the input data.
- Return type:
scalar or DataArray