-
Notifications
You must be signed in to change notification settings - Fork 915
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
[FEA] Add dot product binary op #8909
Conversation
rerun tests |
Codecov Report
@@ Coverage Diff @@
## branch-21.10 #8909 +/- ##
===============================================
Coverage ? 10.77%
===============================================
Files ? 115
Lines ? 19138
Branches ? 0
===============================================
Hits ? 2062
Misses ? 17076
Partials ? 0 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.
Changes look good to me!
rerun tests |
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.
This looks fine overall. It's unfortunate that it has to bypass the other binop machinery, but since the dot product is not strictly column by column I don't see a good alternative. Also we're dispatching to cupy rather quickly so it's not a huge issue.
Co-authored-by: Vyas Ramasubramani <[email protected]>
@charlesbluca is this ready for another round of review? |
Yup, added a special case in |
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.
Looks good! I have a couple of higher-level questions, but nothing that needs to hold this up.
- I noticed that you added some more descriptive comments for reflected ops. Was that requested during review? Perhaps we should instead include links to the Python Data Model page, specifically the section that describes reflected binops.
- I get that we try to match pandas everywhere, including docs, but maintaining N copies of comments like the "Among flexible wrappers..." seems bound to get out of date. Do we really need that? If we do, perhaps we should use a formatted template for those docstrings to reduce repetition (although that would be out of scope for this PR).
Thanks @vyasr!
|
Regarding templates: yes, but very haphazardly and certainly not with any consistent plan across the code base. I opened #9050 to discuss this further. Feel free to merge this whenever you've updated the documentation on reflection as you see fit. |
rerun tests |
@gpucibot merge |
Closes #2448
Implements dot product for dataframes and series by using
cupy.ndarray.dot
on their underlyingvalues
property.