ENH: bool sparse now supports logical op #14000

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants
Member

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 added this to the 0.19.0 milestone Aug 14, 2016

@sinhrks sinhrks ENH: bool sparse now supports logical op
6db3096

codecov-io commented Aug 14, 2016 edited

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 closed this in 471c4e7 Aug 16, 2016

Contributor

jreback commented Aug 16, 2016

thanks!

sinhrks deleted the sinhrks:sparse_bool branch Aug 16, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment