-
Notifications
You must be signed in to change notification settings - Fork 891
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
Refactor array function #10364
Refactor array function #10364
Conversation
…much as possible and remove remaining cruft.
Codecov Report
@@ Coverage Diff @@
## branch-22.04 #10364 +/- ##
================================================
+ Coverage 10.42% 10.64% +0.21%
================================================
Files 119 126 +7
Lines 20603 20938 +335
================================================
+ Hits 2148 2228 +80
- Misses 18455 18710 +255
Continue to review full report at Codecov.
|
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.
Beautiful!
@gpucibot merge |
This PR cleans up the implementation of
__array_function__
forSeries
andDataFrame
to bring them further into alignment. It also inlines a number of functions defined inutils/utils.py
that were previously used only inSeries.__array_ufunc__
, building on the improvements in #10217, #10287, and #10346 to clear out methods related to the old__array_ufunc__
dispatch that are now only used by this__array_function__
implementation. Inlining these methods also allows significant simplification since they were handling cases that are no longer relevant or possible. Unlike those previous PRs, this one does not actually enable any new features. Although it should marginally accelerate array functions by simplifying the dispatch logic, the fact that this API makes few promises about the nature of the function being applied and our desire to have it "just work" as much as possible means that we must simply adopt an EAFP approach and returnNotImplemented
if any part of the process fails.