-
Notifications
You must be signed in to change notification settings - Fork 912
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] Support missing operators in cudf.Series (__divmod__
, __rdivmod__
, __round__
).
#10177
Comments
List of other operators I've found are implemented in pandas but not cudf:
|
#10360 handles the reverse binary operators. The three that you listed in your last comment are not yet done. divmod and rdivmod are out of scope for #10360 but are in general trivial to implement in the relevant classes once that PR is merged since they are just
I think they should probably just bypass the new binop machinery, but maybe there will be a benefit to including them.
|
__rxor__
, __divmod__
, __rdivmod
, __round__
).
__rxor__
, __divmod__
, __rdivmod
, __round__
).__rxor__
, __divmod__
, __rdivmod__
, __round__
).
This PR builds on the framework introduced in #9925 to implement scans. I plan to apply this mixin to ColumnBase as well, but that will require more work to clean up binary operations for column types and it is large enough to merit a separate PR. Contributes to #10177. Authors: - Vyas Ramasubramani (https://github.com/vyasr) Approvers: - Michael Wang (https://github.com/isVoid) - Ashwin Srinath (https://github.com/shwina) URL: #10360
This issue has been labeled |
This issue has been labeled |
__rxor__
, __divmod__
, __rdivmod__
, __round__
).__divmod__
, __rdivmod__
, __round__
).
Is your feature request related to a problem? Please describe.
cudf.Series
does not have reverse binary operators for bitwise operators like__rxor__
. This was caught after changing the output ofSeries.hash_values
from acupy.array
to acudf.Series
in #9390, which broke NVTabular: NVIDIA-Merlin/NVTabular#1376 (review). Thecupy.array
class supports both directions, likearray ^ scalar
andscalar ^ array
. Similarly, pandas supports both directions. Currentlycudf.Series
only supportsseries ^ scalar
.Describe the solution you'd like
Add reverse binary operators for all cases that are missing, which include at least bitwise operators like
__rxor__
but possibly others as well. Missing operators have been addressed several times in the past (#208, #213, #1292, #8598, ...). Resolving this issue should involve checking the full list in the Python object model documentation to make sure we catch everything that pandas supports.Additional context
A workaround is to use the binary operator in the reverse order (for commutative operators).
The text was updated successfully, but these errors were encountered: