Closed
Description
Consider the following examples:
In [1]: a = np.arange(6)
In [2]: np.percentile(a, 50)
Out[2]: 2.5
In [3]: np.percentile(a, 50, axis=0)
Out[3]: 2.5
In [4]: np.nanpercentile(a, 50)
Out[4]: 2.5
In [5]: np.nanpercentile(a, 50, axis=0)
Out[5]: array(2.5)
In [6]: np.__version__
Out[6]: '1.11.2'
All return a scalar, except for nanpercentile
when axis=0
is specified.