-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG: modf(SparseArray) #26947
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
BUG: modf(SparseArray) #26947
Conversation
Closes pandas-dev#26946 (cherry picked from commit 430f664ddbb4dab542b34b2c75b6d086fdef4934)
Codecov Report
@@ Coverage Diff @@
## master #26947 +/- ##
==========================================
- Coverage 91.87% 91.86% -0.01%
==========================================
Files 180 180
Lines 50743 50746 +3
==========================================
Hits 46620 46620
- Misses 4123 4126 +3
Continue to review full report at Codecov.
|
1 similar comment
Codecov Report
@@ Coverage Diff @@
## master #26947 +/- ##
==========================================
- Coverage 91.87% 91.86% -0.01%
==========================================
Files 180 180
Lines 50743 50746 +3
==========================================
Hits 46620 46620
- Misses 4123 4126 +3
Continue to review full report at Codecov.
|
Ah I forgot the issue in the release note. I have another PR that's on top of this one. I'll add it there since CI is already green here. |
@@ -1697,6 +1697,17 @@ def __array_ufunc__(self, ufunc, method, *inputs, **kwargs): | |||
# No alignment necessary. | |||
sp_values = getattr(ufunc, method)(self.sp_values, **kwargs) | |||
fill_value = getattr(ufunc, method)(self.fill_value, **kwargs) | |||
|
|||
if isinstance(sp_values, tuple): |
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.
did u test divmod ?
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.
Already tested. divmod goes through the dispatch to SparseArray.__divmod__
. We didn't previously have any tests for ufuncs returning multiple outputs that aren't also a dunder method.
Closes #26946