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

Change the like API to behave like a predicate #1340

Merged
merged 20 commits into from Dec 4, 2015

Conversation

Projects
None yet
2 participants
@cpcloud
Member

cpcloud commented Dec 4, 2015

closes #1333

@cpcloud cpcloud self-assigned this Dec 4, 2015

@cpcloud cpcloud added this to the 0.9.0 milestone Dec 4, 2015

@cpcloud

This comment has been minimized.

Member

cpcloud commented Dec 4, 2015

@llllllllll @cowlicks any comments here?

@cpcloud

This comment has been minimized.

Member

cpcloud commented Dec 4, 2015

@llllllllll @cowlicks probably going to merge this soon

@@ -267,7 +267,9 @@ def compute_up(t, x, **kwargs):
@dispatch(Selection, np.ndarray)
def compute_up(sel, x, **kwargs):
return x[compute(sel.predicate, {sel._child: x})]
predicate = compute(sel.predicate, {sel._child: x})
cond = getattr(predicate, 'values', predicate)

This comment has been minimized.

@llllllllll

llllllllll Dec 4, 2015

Member

Why would this become a series?

This comment has been minimized.

@cpcloud

cpcloud Dec 4, 2015

Member

Because the like operation is done in the pandas backend

This comment has been minimized.

@llllllllll

llllllllll Dec 4, 2015

Member

I am trying to find where the ndarray gets coerced into a series for the Like to dispatch properly

This comment has been minimized.

@llllllllll

llllllllll Dec 4, 2015

Member

I didn't realize numpy fell back to pandas. This makes much more sense, thanks

@cpcloud

This comment has been minimized.

Member

cpcloud commented Dec 4, 2015

merging on pass

cpcloud added a commit that referenced this pull request Dec 4, 2015

Merge pull request #1340 from cpcloud/like-bool
Change the like API to behave like a predicate

@cpcloud cpcloud merged commit 22e61e5 into blaze:master Dec 4, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@cpcloud cpcloud deleted the cpcloud:like-bool branch Dec 4, 2015

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