8000 nanpercentile returns 0-d array instead of scalar with axis=0 · Issue #8220 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content
nanpercentile returns 0-d array instead of scalar with axis=0 #8220
Closed
@jorisvandenbossche

Description

@jorisvandenbossche

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0