Skip to content

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

Merged
charris merged 1 commit into
numpy:masterfrom
juliantaylor:signbit
Jan 11, 2016
Merged

charris merged 1 commit into
numpy:masterfrom
juliantaylor:signbit

Conversation

@juliantaylor

Copy link
Copy Markdown
Contributor

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

@juliantaylor

Copy link
Copy Markdown
Contributor Author

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

@charris

charris commented Jan 11, 2016

Copy link
Copy Markdown
Member

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

@juliantaylor

Copy link
Copy Markdown
Contributor Author

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

@juliantaylor

Copy link
Copy Markdown
Contributor Author

timeouts oO
can you restart appveyor jobs?

@charris

charris commented Jan 11, 2016

Copy link
Copy Markdown
Member

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

@juliantaylor

Copy link
Copy Markdown
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

charris commented Jan 11, 2016

Copy link
Copy Markdown
Member

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

charris commented Jan 11, 2016

Copy link
Copy Markdown
Member

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
Copy Markdown
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

charris commented Jan 11, 2016

Copy link
Copy Markdown
Member

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

charris commented Jan 11, 2016

Copy link
Copy Markdown
Member

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

@juliantaylor

Copy link
Copy Markdown
Contributor Author

ah I think I know the issue!

@juliantaylor

Copy link
Copy Markdown
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

charris commented Jan 11, 2016

Copy link
Copy Markdown
Member

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

@jakirkham

Copy link
Copy Markdown
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

charris commented Jan 11, 2016

Copy link
Copy Markdown
Member

@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

charris commented Jan 11, 2016

Copy link
Copy Markdown
Member

@juliantaylor Kudos for tracking that down.

@jakirkham

Copy link
Copy Markdown
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