dask.array.percentile(a, q, interpolation='linear', method='default')[source]

Approximate percentile of 1-D array

qarray_like of float

Percentile or sequence of percentiles to compute, which must be between 0 and 100 inclusive.

interpolation{‘linear’, ‘lower’, ‘higher’, ‘midpoint’, ‘nearest’}, optional

The interpolation method to use when the desired percentile lies between two data points i < j. Only valid for method='dask'.

  • ‘linear’: i + (j - i) * fraction, where fraction is the fractional part of the index surrounded by i and j.

  • ‘lower’: i.

  • ‘higher’: j.

  • ‘nearest’: i or j, whichever is nearest.

  • ‘midpoint’: (i + j) / 2.

method{‘default’, ‘dask’, ‘tdigest’}, optional

What 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.

See also


Numpy’s equivalent Percentile function