-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG: fix numpy min/max compat with index (#26125) #26324
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
Codecov Report
@@ Coverage Diff @@
## master #26324 +/- ##
==========================================
- Coverage 92.04% 92.03% -0.01%
==========================================
Files 175 175
Lines 52291 52297 +6
==========================================
+ Hits 48132 48134 +2
- Misses 4159 4163 +4
Continue to review full report at Codecov.
|
1 similar comment
Codecov Report
@@ Coverage Diff @@
## master #26324 +/- ##
==========================================
- Coverage 92.04% 92.03% -0.01%
==========================================
Files 175 175
Lines 52291 52297 +6
==========================================
+ Hits 48132 48134 +2
- Misses 4159 4163 +4
Continue to review full report at Codecov.
|
thanks @Batalex |
I'm a bit surprised at the performance impact here http://pandas.pydata.org/speed/pandas/#index_object.Range.time_min (about 20-25%). It may be worth seeing if the performance of our numpy compat validators can be improved. |
On second thought, maybe the relative perf slowdown isn't too surprising, since RangeIndex.min / max is basically free. So it looks like a large slowdown, but in absolute terms it's not so bad... Still may be worth profiling things to see if there's any easy wins to be had in the validators (as in theory those should be cheap too). |
git diff upstream/master -u -- "*.py" | flake8 --diff
When working on the original issue, I came across something similar :
RangeIndex
had its own implementation ofmax
/min
with the same behaviorIndex
&RangeIndex
could both benefit from adding another compat callI changed it to be consistent with the rest of pandas
ValueError: the 'out' parameter is not supported in the pandas implementation of argmax()
.