Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
API: generalized check_array_indexer for validating array-like getitem indexers #31150
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
API: generalized check_array_indexer for validating array-like getitem indexers #31150
Changes from 12 commits
e8f539a
4fa9f5a
b55dfd2
095b741
58bfe78
5ce8d85
ebc2150
4a51d97
50490aa
c979df8
ce2e042
4d447bf
d930e84
9ed8fe9
2f8cd27
4d9a201
097d221
3c5e4c6
1ca35d1
e5ea9b4
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are there any uses of is_bool_indexer left? can you just get rid of them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we still use it in several places. As long as we don't have deprecated+removed boolean indexing with object dtype (again, see the non-inline discussion in this PR, #31150 (comment)), we will need this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can u create an issue to rename / refactor / remove is_book_indexer then
as it’s purpose is now different before - it is no longer the one true way
and now we have 2 ways of checking booking indexers
either check_array_indexer should completely subsume it or it should be renamed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, because there are places we allow object dtype (for backwards compatibility), and there are places where we are more strict.
Why would it need to be renamed? Or what name do you suggest?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would just incorporate it in check_array_indexer to be honest
it’s more complicated the way you have have it now and just plain confusing
i have to know that is_bool_indexer is something that doesn’t check indexing except in object arrays
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this repeated non purpose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
repeated from where?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the next check is_bool_indexer is duplicative
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not fully duplicative, see my long explanation at #31150 (comment). It's mainly for dealing with object dtype.