Repository navigation
DOC: note on integers as advanced indices [skip actions] - #33092
Open
pereradrian wants to merge 1 commit into
Open
pereradrian wants to merge 1 commit into
pereradrian wants to merge 1 commit into
Conversation
pereradrian
force-pushed
the
doc-advanced-indexing-pitfall
branch
from
October 19, 2026 09:41
eeca5cd to
e0fe724
Compare
pereradrian
force-pushed
the
doc-advanced-indexing-pitfall
branch
from
October 19, 2026 09:43
e0fe724 to
dec6273
Compare
This was referenced Oct 19, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
PR summary
Closes #30022.
The "Integer array indexing" section does not mention that an integer combined
with an integer array also counts as an advanced index. As a result,
x[0, :, [1, 2]]returns shape(2, 5)instead of the(5, 2)many usersexpect. The full explanation exists in "Combining advanced and basic indexing",
but readers of the integer-indexing section are unlikely to find it.
Following the minimal approach suggested in the issue, this PR adds a short
note at the end of "Integer array indexing" with the example from the issue
and a link to the section with the full rules. No content is reordered.
Documentation-only change.
First time contributor introduction
Hi! I’m Adrián. I use Python for work, for my studies and for personal projects, with NumPy as a constant part of that. This is my first open source contribution.
AI Disclosure
I used Claude (Anthropic) to help pick a beginner issue, to draft the note
added to
basics.indexing.rst, and to draft this PR description. I reviewedthe change, checked the example outputs locally, and I take responsibility
for it. I'll handle all review discussion myself.