-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
BUG: integers to a negative integer powers should error. #8127
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wrwrwr
reviewed
Oct 10, 2016
|
||
* zero to negative integer powers returned least integral value. | ||
* 1, -1 to negative integer powers returned correct values | ||
* all remaining integers returne zero when raised ot negative integer powers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some typos: "returne[d]" and "ot".
This is a change in behaviour. Previously * zero to negative integer powers returned least integral value. * 1, -1 to negative integer powers returned correct values * all remaining integers returned zero when raised to negative integer powers. All of these cases now raise a ``ValueError``. It was felt that a simple rule was the best way to go rather than have special exceptions for the units. If you need negative powers, use an inexact type.
98416df
to
f4f8a1c
Compare
jorisvandenbossche
added a commit
to jorisvandenbossche/pandas
that referenced
this pull request
Oct 26, 2016
Numpy starts to error on those cases from 1.12 numpy/numpy#8127
jorisvandenbossche
added a commit
to jorisvandenbossche/pandas
that referenced
this pull request
Oct 26, 2016
Numpy starts to error on those cases from 1.12 numpy/numpy#8127
jreback
added a commit
to jreback/pandas
that referenced
this pull request
Oct 26, 2016
jreback
added a commit
to pandas-dev/pandas
that referenced
this pull request
Oct 26, 2016
…wers xref numpy/numpy#8127 closes #14489 Author: Jeff Reback <jeff@reback.net> Closes #14498 from jreback/compat and squashes the following commits: 882872e [Jeff Reback] COMPAT/TST: fix test for range testing of negative integers to neg powers
jorisvandenbossche
pushed a commit
to jorisvandenbossche/pandas
that referenced
this pull request
Nov 2, 2016
… negative integers to neg powers xref numpy/numpy#8127 closes pandas-dev#14489 Author: Jeff Reback <jeff@reback.net> Closes pandas-dev#14498 from jreback/compat and squashes the following commits: 882872e [Jeff Reback] COMPAT/TST: fix test for range testing of negative integers to neg powers (cherry picked from commit 050bf60)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Rebase of #7599 with changes.
This is a change in behavior. Previously
All of these cases now raise a
ValueError
. It was felt that a simplerule was the best way to go rather than have special exceptions for the
units. If you need negative powers, use an inexact type.
Fixes gh-7510.