Skip to content
masterclass Buddy

NumPy · Function

np.percentile

Computes one or more percentiles of an array. It can operate over the whole array or selected axes and supports several estimation methods.

Last updated

Since
2.0.0 for weights

Syntax

numpy.percentile(a, q, axis=None, out=None, overwrite_input=False, method='linear', keepdims=False, *, weights=None)

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • mean
  • median
  • nanpercentile
  • quantile

Source: numpy.percentile — NumPy v2.5 Manual. Checked 2026-11-03.