Skip to content

ENH: vectorize isinf and isfinite - #6980

Merged
charris merged 1 commit into
numpy:masterfrom
juliantaylor:vect-isfinite
Jan 10, 2016
Merged

charris merged 1 commit into
numpy:masterfrom
juliantaylor:vect-isfinite

Conversation

@juliantaylor

Copy link
Copy Markdown
Contributor

isfinite is especially valuable as its needed to verify inputs are
suitable for lapack.

Comment thread numpy/core/src/umath/loops.c.src Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to break these out into separate repeats, the expression in the if statement here is getting out of hand.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes might make sense to remove isnan from the binary special case and just add the isnan code to the same code section

@charris

charris commented Jan 9, 2016

Copy link
Copy Markdown
Member

There are benchmarks for functions (bench_ufunc), it would be interesting to see the result.

isfinite is especially valuable as its needed to verify inputs are
suitable for lapack.
@juliantaylor

Copy link
Copy Markdown
Contributor Author

updated, also added signbit for symmetry, even though that function is likely not very important.

charris added a commit that referenced this pull request Jan 10, 2016
ENH: vectorize isinf and isfinite
@charris
charris merged commit 3a92c54 into numpy:master Jan 10, 2016
@charris

charris commented Jan 10, 2016

Copy link
Copy Markdown
Member

Thanks Julian.

@juliantaylor
juliantaylor deleted the vect-isfinite branch January 10, 2016 17:55
@charris

charris commented Jan 11, 2016

Copy link
Copy Markdown
Member

@juliantaylor Signbit seems to be a problem on Windows, python 3.5 x86. Python 2.7 works fine.

@charris charris mentioned this pull request Jan 11, 2016
charris added a commit to charris/numpy that referenced this pull request Jan 11, 2016
@juliantaylor

Copy link
Copy Markdown
Contributor Author

yes strange, I don't see an obvious error.
Also weird that the test here worked

@charris

charris commented Jan 11, 2016

Copy link
Copy Markdown
Member

I'm guessing it has something to do with the flags Python was compiled with. Python comes from conda, I'm assuming it is official python.org python, but 3.5 on windows is uses the 'new' windows setup. I think I will revert this until we can figure out what is going on.

@juliantaylor

Copy link
Copy Markdown
Contributor Author

seeing what happens when just reverting the middle loop might be interesting

@charris

charris commented Jan 11, 2016

Copy link
Copy Markdown
Member

Hmm, the environments are the same, AFAICT, for when this worked and current master. I wonder if something in master has changed between then and now that could cause this?

@charris

charris commented Jan 11, 2016

Copy link
Copy Markdown
Member

Not much has gone in and, oddly, the failing tests seem to vary a bit. Reverting this PR fixes things... I wonder if some register state is being changed somewhere?

I think I'd rather get master back in shape and deal with this in a new PR. Do you still have the branch?

charris added a commit to charris/numpy that referenced this pull request Feb 23, 2016
This reverts commit 3a92c54,
reversing changes made to 8a1c582.

Second 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.
@jakirkham

Copy link
Copy Markdown
Contributor

Did this end up getting added back at some point?

@juliantaylor

Copy link
Copy Markdown
Contributor Author

it was never reverted, the issue was fixed in #6994

@jakirkham

Copy link
Copy Markdown
Contributor

Should have read the commit message above more closely. Guess it was only reverted for NumPy 1.11, but it was included in NumPy 1.12.0+.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants