-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: fixed index power operation #14996
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
Conversation
* The power operation on a range of indexes was fixed. See issue #14973
@@ -105,6 +105,21 @@ def test_numeric_compat(self): | |||
for r, e in zip(result, expected): | |||
tm.assert_index_equal(r, e) | |||
|
|||
#test power calculations both ways |
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.
model this after the existing code, IOW, use idx
which is already define.
add a comment with this issue number.
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.
Thank you for your guidance. Changes implemented.
pow_range = 2.0**num_range | ||
idxs = pd.Float64Index(range(1, 11)) | ||
|
||
expected_pow_values = pd.Float64Index(pow_range) |
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.
use expected
and result
@@ -282,6 +282,7 @@ Performance Improvements | |||
Bug Fixes | |||
~~~~~~~~~ | |||
|
|||
- Bug in ``Indexes`` Power numerical operations did not operate correctly (:issue:`14973`) |
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.
Bug in Index
power operations with with reversed operands
* Changed variable names to follow code standards * Changed changelog to correct wording * Added Github issue in comment to follow documentation standard
Current coverage is 84.78% (diff: 100%)@@ master #14996 diff @@
==========================================
Files 145 145
Lines 51090 51091 +1
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 43315 43317 +2
+ Misses 7775 7774 -1
Partials 0 0
|
@jreback anything more I can do to have it accepted? |
thanks! |
git diff upstream/master | flake8 --diff