Repository navigation
Fix bug with raising to a negative power. - #8263
Conversation
This is a regression introduced by astropygh-7649 and reported in astropygh-8260. Before this fix: ``` v2 = 1*u.m**2/u.s**2 (v2 ** (-1/2)).to(u.s/u.m) ``` leads to a unit conversion error because the bases are in the wrong order.
Codecov Report
@@ Coverage Diff @@
## master #8263 +/- ##
=======================================
Coverage 86.91% 86.91%
=======================================
Files 383 383
Lines 57889 57889
Branches 1056 1056
=======================================
Hits 50313 50313
Misses 6962 6962
Partials 614 614
Continue to review full report at Codecov.
|
|
StanczakDominik
left a comment
There was a problem hiding this comment.
LGTM! Thanks for the quick fix!
pllim
left a comment
There was a problem hiding this comment.
Approved by user who encountered this bug.
|
I just wanted to reconfirm that I checked again whether this solves our units issues in plasmapy and all tests are green - this fix appears to have worked 😄 |
|
@StanczakDominik - thanks for checking, and of course for reporting in the first place - with the new test, at least this bug will not return! |
Fix bug with raising to a negative power.
This is a regression introduced by gh-7649 and reported in gh-8260.
Before this fix:
leads to a unit conversion error because the bases are in the
wrong order.
fixes #8260
@bsipocz - this is a pretty bad bug, so may drive the 3.1.1 release...