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

Support slicing with numpy arrays #754

Merged
merged 2 commits into from
Sep 2, 2015
Merged

Support slicing with numpy arrays #754

merged 2 commits into from
Sep 2, 2015

Conversation

arvoelke
Copy link
Contributor

Previously if you tried to slice with a numpy array, you got some obscure error about needing any() or all() to compare the slice to slice(None). This should make it work now.

Branched off #753.

@hunse
Copy link
Collaborator

hunse commented Sep 2, 2015

Okay, I think this is good to go. The changes to full_transform aren't really necessary, since we don't use this in the builder anymore, but I think some backends might, so we might as well keep it up to date. eq_none_slice didn't seem like a generally useful function to me, so I just made it inline where it's used in full_transform.

@hunse
Copy link
Collaborator

hunse commented Sep 2, 2015

Okay, made the discussed changes.

@tbekolay
Copy link
Member

tbekolay commented Sep 2, 2015

OK, LGTM. Should I squash the first two commits or keep them separate?

@hunse
Copy link
Collaborator

hunse commented Sep 2, 2015

I couldn't decide whether to squash or not, either. Probably best to squash, since with other changes to the repo, it's actually only the first commit that's needed for slicing with numpy arrays, so it might as well all be together.

hunse and others added 2 commits September 2, 2015 13:56
These were doing approximately the same thing, so this unifies them.
Scalars (np.generic) act like np.ndarrays, so we might as well allow
them everywhere.
Also some type compatability fixes on base objects.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

3 participants