0
votes

I am running Python 3.6.4 with Anaconda and Spyder.

When I am trying to set a value of a NumPy array to NaN I am getting the following RuntimeWarning.

a = numpy.array([5.0,2.0,1.0])

a[0] = numpy.nan

C:\Users..\Anaconda3\lib\site-packages\numpy\core_methods.py:29: RuntimeWarning: invalid value encountered in reduce return umr_minimum(a, axis, None, out, keepdims)

C:\Users..\Anaconda3\lib\site-packages\numpy\core_methods.py:26: RuntimeWarning: invalid value encountered in reduce return umr_maximum(a, axis, None, out, keepdims)

Why is this happening?

1
See this Github issue - it looks like it is an issue with spyder. - miradulo
not present in numpy '1.14.3' - NaN

1 Answers

2
votes

I have updated the NumPy version and everything works fine now.