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

ENH/BUG: Sparse now supports comparison op #12971

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
2 participants
@sinhrks
Member

sinhrks commented Apr 23, 2016

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

on current master

pd.SparseArray([1, 2, np.nan]) > 0
# [True, True, nan]
# Fill: nan
# IntIndex
# Indices: array([0, 1], dtype=int32)

# Expected
# [True, True, False]
a = pd.SparseArray([1, 2, 0])
b = pd.SparseArray([0, 1, np.nan])
a > b
# ValueError: operands could not be broadcast together with shapes (3,) (2,) 

@sinhrks sinhrks added this to the 0.18.1 milestone Apr 23, 2016

@jreback

View changes

Show outdated Hide outdated pandas/sparse/array.py Outdated
@sinhrks

This comment has been minimized.

Show comment
Hide comment
@sinhrks

sinhrks Apr 25, 2016

Member

Ok, fixed and now green.

Member

sinhrks commented Apr 25, 2016

Ok, fixed and now green.

@jreback jreback closed this in 8890cc1 Apr 25, 2016

@jreback

This comment has been minimized.

Show comment
Hide comment
@jreback

jreback Apr 25, 2016

Contributor

thank you sir!

Contributor

jreback commented Apr 25, 2016

thank you sir!

@sinhrks sinhrks deleted the sinhrks:sparse_bool_test branch Apr 25, 2016

nps added a commit to nps/pandas that referenced this pull request May 17, 2016

ENH/BUG: Sparse now supports comparison op
Author: sinhrks <sinhrks@gmail.com>

Closes pandas-dev#12971 from sinhrks/sparse_bool_test and squashes the following commits:

d57807c [sinhrks] ENH/BUG: Sparse now supports comparison op
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment