Skip to content

BUG: abs with nan on 64-bit floats on 32-bit platform? #7440

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jreback opened this issue Mar 20, 2016 · 3 comments
Open

BUG: abs with nan on 64-bit floats on 32-bit platform? #7440

jreback opened this issue Mar 20, 2016 · 3 comments

Comments

@jreback
Copy link

jreback commented Mar 20, 2016

occurs also on 1.10.4

[pandas_test] C:\Miniconda3-32\Scripts>python
Python 2.7.11 |Continuum Analytics, Inc.| (default, Jan 29 2016, 15:36:56) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
>>> import numpy as np
>>> np.__version__
'1.9.2'
>>> np.abs(np.array([0,np.nan],dtype='float64'))
__main__:1: RuntimeWarning: invalid value encountered in absolute
array([  0.,  nan])
>>>

you are giving a warning, but not sure why are not handling it.

@njsmith
Copy link
Member

njsmith commented Mar 20, 2016

What's the bug? You expected the same result, but without the warning printed?

@jreback
Copy link
Author

jreback commented Mar 20, 2016

doens't show a warning on 64-bit. so the bug is the warning, which seems like its not working.

[pandas2] C:\>python
Python 2.7.11 |Continuum Analytics, Inc.| (default, Jan 29 2016, 14:26:21) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
>>> import numpy as np
>>> np.__version__
'1.10.4'
>>> np.abs(np.array([0,np.nan],dtype='float64'))
array([  0.,  nan])
>>>

@WarrenWeckesser
Copy link
Member

This issue is over five years old and hasn't had any comments since the day it was created. Can anyone reproduce the spurious warning with a recent release of NumPy on a 32-bit Windows platform with a supported version of Python?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants