-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
REF: define nanargminmax without values_for_argsort #37815
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
This was done explicitly this way in the original PR #27801 (@jbrockmendel you actually explicitly questioned that use, which led to some discussion about it: #27801 (comment)) This gives a big slowdown, as doing a full argsort (to then only use a single index) is more expensive as argmin or argmax. |
Thanks for linking back there.
I think a Technically Correct solution would look something like:
Getting there may be a hassle given backwards compatibility, but i think getting rid of the ambiguity as to values_for_argsort is worth it. |
What's the benefit of your proposed scheme compared to the current situation? (i.e. what is quoted, assuming we properly document this) |
I think its clearer. It would also make it much harder for us mess up and use _values_for_argsort in places we're not supposed to (even if we document it correctly, many a slip) |
But also in your scheme we have a |
But it wouldn't be in the base class EA, which wouldn't have values_for_argsort at all |
@jorisvandenbossche if you want to revert this i wont argue the point |
This reverts commit 840c142.
prob should open a new issue so don't forget about this @jbrockmendel |
…ev#37815)" (pandas-dev#38177) This reverts commit 840c142.
This reverts commit 840c142.
opened #38201 to revert this |
Ah, I already did that yesterday -> #38177 I think Jeff was asking for an issue about a better solution (eg your sketch above at #37815 (comment)). Now, I think we can use the existing #27218 for that. |
No description provided.