Skip to content

BUG: make result of isfinite/isinf/signbit a boolean #6994

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

Merged
merged 1 commit into from
Jan 11, 2016

Conversation

juliantaylor
Copy link
Contributor

may return something else than one or zero and npy_bool is
unfortunately an int8 not a c99 bool

@juliantaylor
Copy link
Contributor Author

let me mess a bit with this
might take a while unless someone has a machine that reproduces the issue

@charris
Copy link
Member

charris commented Jan 11, 2016

Yeah, it's painful. I have another test running to see if anything changed between merging your branch and current master.

@juliantaylor
Copy link
Contributor Author

lets see if I can reproduces it in my windows vm, probably faster

@juliantaylor
Copy link
Contributor Author

timeouts oO
can you restart appveyor jobs?

@charris
Copy link
Member

charris commented Jan 11, 2016

Well, I was able to restart all of them...

@juliantaylor
Copy link
Contributor Author

hm it works on win32 python34, so maybe a python3.5 problem? Unfortunately I can't test that as I only have windows xp available right now on which 3.5 won't install ._.

@charris
Copy link
Member

charris commented Jan 11, 2016

Curiously, when I revert back to merge, only FAIL: test_nans_infs (test_half.TestHalf) fails. There is something loose rattling around. Could be a Python 3.5 bug, could be a compiler flag, might be a flags register running wild. Ugh, nasty problem.

@charris
Copy link
Member

charris commented Jan 11, 2016

Looks like you didn't revert the whole merge, it's now failing on 64 bits also.. I did git revert -m 1 3a92c5492

@juliantaylor
Copy link
Contributor Author

yes that was intentional, so its not the vector code that narrows it down
but its also worrying as this is dog standard code, unless I miss something obvious wrong

@charris
Copy link
Member

charris commented Jan 11, 2016

Can't rule out compiler bugs either. I think it safe to say that this problem is Python 3.5 specific, which includes new compilers and possibly build flags.

@charris
Copy link
Member

charris commented Jan 11, 2016

The half-float error vaguely smells of a possible optimization problem.

@juliantaylor
Copy link
Contributor Author

ah I think I know the issue!

@juliantaylor
Copy link
Contributor Author

lets see if that works, been using too much c99/c++ lately to notice this error ...

@juliantaylor juliantaylor changed the title BUG: revert signbit vectorization BUG: make result of signbit a boolean Jan 11, 2016
may return something else than one or zero and npy_bool is
unfortunately an int8 not a c99 bool
@juliantaylor juliantaylor changed the title BUG: make result of signbit a boolean BUG: make result of isfinite/isinf/signbit a boolean Jan 11, 2016
@charris
Copy link
Member

charris commented Jan 11, 2016

If only we could make c99 standard... Although I expect that would turn up other problems.

@jakirkham
Copy link
Contributor

So, this one checked out ( https://ci.appveyor.com/project/charris/numpy/build/1.0.446 ). Did it just resolve down to adding != 0 everywhere?

@charris
Copy link
Member

charris commented Jan 11, 2016

@jakirkham Looks like it.

charris added a commit that referenced this pull request Jan 11, 2016
BUG: make result of isfinite/isinf/signbit a boolean
@charris charris merged commit 4b82b1b into numpy:master Jan 11, 2016
@charris
Copy link
Member

charris commented Jan 11, 2016

@juliantaylor Kudos for tracking that down.

@jakirkham
Copy link
Contributor

Fixes #6991

charris added a commit to charris/numpy that referenced this pull request Feb 23, 2016
This reverts commit 4b82b1b,
reversing changes made to 3a9c90c.

First of two reversions to undo vectorization of isinf, isnan,
and signbit for Numpy 1.11.0. The changes led to test failures on
windows for Python 2.6. Because Python 2.6 will not be supported by
Numpy 1.12, this does not need to be done for current master.
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

Successfully merging this pull request may close these issues.

3 participants