8000 Confusing warning for median of empty array. · Issue #6197 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content
Confusing warning for median of empty array. #6197
Open
@anntzer

Description

@anntzer
In [1]: np.median([])
/usr/lib/python3.4/site-packages/numpy/core/_methods.py:59: RuntimeWarning: Mean of empty slice.
  warnings.warn("Mean of empty slice.", RuntimeWarning)
Out[1]: nan

Oops.
[numpy 1.9.2]

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