quantile

quantile(X: ndarray, q: float) float[source]

Numba quantile function for a 1d numpy array.

Parameters:
X1d numpy array

A 1d numpy array of values

qfloat

The quantile to compute, must be between 0 and 1

Returns:
quantilefloat

The quantile of the input array

Examples

>>> import numpy as np
>>> from aeon.utils.numba.stats import quantile
>>> X = np.array([1, 2, 2, 3, 3, 3, 4, 4, 4, 4])
>>> q = quantile(X, 0.5)