Skip to content
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

Merged
merged 1 commit into from
Jun 19, 2019
Merged

Conversation

TomAugspurger
Copy link
Contributor

Closes #26946

Closes pandas-dev#26946

(cherry picked from commit 430f664ddbb4dab542b34b2c75b6d086fdef4934)
@TomAugspurger TomAugspurger added the Sparse Sparse Data Type label Jun 19, 2019
@TomAugspurger TomAugspurger added this to the 0.25.0 milestone Jun 19, 2019
@codecov
Copy link

codecov bot commented Jun 19, 2019

Codecov Report

Merging #26947 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            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
Flag Coverage Δ
#multiple 90.46% <100%> (ø) ⬆️
#single 41.12% <0%> (-0.07%) ⬇️
Impacted Files Coverage Δ
pandas/core/arrays/sparse.py 93.73% <100%> (+0.02%) ⬆️
pandas/io/gbq.py 88.88% <0%> (-11.12%) ⬇️
pandas/core/frame.py 96.89% <0%> (-0.12%) ⬇️
pandas/util/testing.py 90.94% <0%> (+0.1%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d47947a...b277b4d. Read the comment docs.

1 similar comment
@codecov
Copy link

codecov bot commented Jun 19, 2019

Codecov Report

Merging #26947 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            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
Flag Coverage Δ
#multiple 90.46% <100%> (ø) ⬆️
#single 41.12% <0%> (-0.07%) ⬇️
Impacted Files Coverage Δ
pandas/core/arrays/sparse.py 93.73% <100%> (+0.02%) ⬆️
pandas/io/gbq.py 88.88% <0%> (-11.12%) ⬇️
pandas/core/frame.py 96.89% <0%> (-0.12%) ⬇️
pandas/util/testing.py 90.94% <0%> (+0.1%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d47947a...b277b4d. Read the comment docs.

@TomAugspurger TomAugspurger changed the title BUG: modfy(SparseArray) BUG: modf(SparseArray) Jun 19, 2019
@TomAugspurger
Copy link
Contributor Author

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.

@TomAugspurger TomAugspurger merged commit baeb1bf into pandas-dev:master Jun 19, 2019
@TomAugspurger TomAugspurger deleted the 26946-modf branch June 19, 2019 17:57
@@ -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):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did u test divmod ?

Copy link
Contributor Author

@TomAugspurger TomAugspurger Jun 19, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Sparse Sparse Data Type
Projects
None yet
Development

Successfully merging this pull request may close these issues.

modfy[SparseArray] raises
3 participants