Back to Numerical Arrays (NumPy)
np.percentile
Compute the q-th percentile of the data along the specified axis.
Syntax
np.percentile(a, q, axis?, keepdims?)
Description
Compute the q-th percentile of the data along the specified axis.
Parameters
| Name | Description |
|---|---|
| a | - Input array |
| q | - Percentile to compute, in range [0, 100] |
| axis(optional) | - Axis along which to compute percentile. null computes percentile of flattened array. |
| keepdims(optional) | - If true, reduced axes are left with size 1 |
Returns
Promise<NDArray | number>