Skip to content

RuntimeWarning for np.array with NaN #11029

@chapochn

Description

@chapochn

When i run the code
A = np.full(7, np.nan)
there is no issue.

When i run
A = np.full(8, np.nan)
and for any array larger than that, i get the warnings:

/mnt/home/[...]/anaconda3/lib/python3.6/site-packages/numpy/core/_methods.py:29: RuntimeWarning: invalid value encountered in reduce
return umr_minimum(a, axis, None, out, keepdims)
/mnt/home/[...]/anaconda3/lib/python3.6/site-packages/numpy/core/_methods.py:26: RuntimeWarning: invalid value encountered in reduce
return umr_maximum(a, axis, None, out, keepdims)

i use spyder 3.2.6, python 3.6.4, numpy 1.14.0
I have this warning on one of my computers (running CentOS Linux 7), but not on the other (running Ubuntu 16.04)
Cannot figure out where the different comes from. Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions