Repository navigation
BUG: integers to a negative integer powers should error. - #8127
Merged
Merged
Conversation
wrwrwr
reviewed
Oct 10, 2016
Contributor
There was a problem hiding this comment.
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.
charris
force-pushed
the
integer-to-negative-power
branch
from
October 20, 2016 19:45
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 <[email protected]> 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 <[email protected]> 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)
This file contains hidden or 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
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.