8000 np.rint(-0.0) wrong on Windows32 · Issue #7004 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

np.rint(-0.0) wrong on Windows32 #7004

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

Closed
pitrou opened this issue Jan 13, 2016 · 8 comments
Closed

np.rint(-0.0) wrong on Windows32 #7004

pitrou opened this issue Jan 13, 2016 · 8 comments

Comments

@pitrou
Copy link
Member
pitrou commented Jan 13, 2016

np.rint(-0.0) correctly returns -0.0 on Linux and Windows64, but not on Windows32:

Python 3.4.4 |Continuum Analytics, Inc.| (default, Jan 11 2016, 13:44:19) [MSC v
.1600 32 bit (Intel)]
Type "copyright", "credits" or "license" for more information.

IPython 4.0.1 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: import numpy as np

In [2]: np.floor(-0.0)
Out[2]: -0.0

In [3]: np.rint(0.0)
Out[3]: 0.0
@matthew-brett
Copy link
Contributor

What version of numpy are you using?

@pitrou
Copy link
Member Author
pitrou commented Jan 13, 2016

Numpy 1.10.1.

@matthew-brett
Copy link
Contributor

Maybe related to this : #6685 - can you upgrade to 1.10.2?

@pitrou
Copy link
Member Author
pitrou commented Jan 13, 2016

I see. This would likely fix it, indeed. Since I'm using conda, I'll wait for the updated release on the Anaconda channels. Thank you!

@njsmith
Copy link
Member
njsmith commented Jan 13, 2016

Should this bug and that one both be closed then, or...?
On Jan 13, 2016 10:53 AM, "Antoine Pitrou" notifications@github.com wrote:

I see. This would likely fix it, indeed. Since I'm using conda, I'll wait
for the updated release on the Anaconda channels. Thank you!


Reply to this email directly or view it on GitHub
#7004 (comment).

@pitrou
Copy link
Member Author
pitrou commented Jan 13, 2016

Perhaps someone with knowledge to build Numpy on a Windows box could test? :-)

@gfyoung
Copy link
Contributor
gfyoung commented Jan 14, 2016

I suspect an upgrade might do it. I don't see this bug on my Windows32 machine.

Python 2.7.11 (v2.7.11:6d1b6a68f775, Dec  5 2015, 20:32:19) [MSC
Intel)] on win32
Type "help", "copyright", "credits" or "license" for more inform
>>> import numpy as np
>>> np.__version__
'1.10.2'
>>> np.rint(-0.0)
-0.0

@charris
Copy link
Member
charris commented Apr 17, 2016

Closing. Please reopen if the issue is still valid in 1.11

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

5 participants
0