dask.array.percentile
dask.array.percentile¶
- dask.array.percentile(a, q, method='linear', internal_method='default', **kwargs)[source]¶
Approximate percentile of 1-D array
- Parameters
- aArray
- qarray_like of float
Percentile or sequence of percentiles to compute, which must be between 0 and 100 inclusive.
- method{‘linear’, ‘lower’, ‘higher’, ‘midpoint’, ‘nearest’}, optional
The interpolation method to use when the desired percentile lies between two data points
i < j
. Only valid formethod='dask'
.‘linear’:
i + (j - i) * fraction
, wherefraction
is the fractional part of the index surrounded byi
andj
.‘lower’:
i
.‘higher’:
j
.‘nearest’:
i
orj
, whichever is nearest.‘midpoint’:
(i + j) / 2
.
Changed in version 2022.1.0: This argument was previously called “interpolation”
- internal_method{‘default’, ‘dask’, ‘tdigest’}, optional
What internal method to use. By default will use dask’s internal custom algorithm (
'dask'
). If set to'tdigest'
will use tdigest for floats and ints and fallback to the'dask'
otherwise.Changed in version 2022.1.0: This argument was previously called “method”.
- interpolationstr, optional
Deprecated name for the method keyword argument.
Deprecated since version 2022.1.0.
See also
numpy.percentile
Numpy’s equivalent Percentile function