Skip to content

ENH: bool sparse now supports logical op #14000

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

Closed
wants to merge 1 commit into from

Conversation

sinhrks
Copy link
Member

@sinhrks sinhrks commented Aug 14, 2016

  • tests added / passed
  • passes git diff upstream/master | flake8 --diff
  • whatsnew entry

implemented bool (logical and / or) op for bool SparseArray. Currently it raises if sp_index are different.

s1 = pd.SparseArray([True, True, True, True, True], dtype=np.bool, fill_value=False)
s2 = pd.SparseArray([False, True, False, True, True], dtype=np.bool, fill_value=False)
s1 & s2
# ValueError: operands could not be broadcast together with shapes (5,) (3,) 

@sinhrks sinhrks added Enhancement Dtype Conversions Unexpected or buggy dtype conversions Sparse Sparse Data Type labels Aug 14, 2016
@sinhrks sinhrks added this to the 0.19.0 milestone Aug 14, 2016
@codecov-io
Copy link

codecov-io commented Aug 14, 2016

Current coverage is 85.28% (diff: 100%)

Merging #14000 into master will increase coverage by <.01%

@@             master     #14000   diff @@
==========================================
  Files           139        139          
  Lines         50214      50224    +10   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits          42822      42832    +10   
  Misses         7392       7392          
  Partials          0          0          

Powered by Codecov. Last update a0d05db...6db3096

@jreback jreback closed this in 471c4e7 Aug 16, 2016
@jreback
Copy link
Contributor

jreback commented Aug 16, 2016

thanks!

@sinhrks sinhrks deleted the sparse_bool branch August 16, 2016 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dtype Conversions Unexpected or buggy dtype conversions Enhancement Sparse Sparse Data Type
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants