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

DOC: improve comment in prepare_index #8277

Merged
merged 1 commit into from
Nov 15, 2016
Merged

Conversation

eric-wieser
Copy link
Member

This confused me a little, since !PyArray_Check(obj) is clearly a superset of PyInt_CheckExact(obj), so this condition felt redundant. Presumably this is an optimization?

Is there any condition where PyInt_CheckExact(obj) is false, yet !PyArray_Check(obj) is true, where we don't just error out on the next lines?

@seberg
Copy link
Member

seberg commented Nov 15, 2016

Yeah, the exact checks are all just to avoid the (compared to indexing) not exceedingly fast checks for subclasses.

@seberg seberg merged commit 443c2f6 into numpy:master Nov 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants