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 example on array broadcasting #26386

Merged
merged 1 commit into from
May 17, 2024
Merged

DOC: Improve example on array broadcasting #26386

merged 1 commit into from
May 17, 2024

Conversation

arunppsg
Copy link
Contributor

@arunppsg arunppsg commented May 5, 2024

The earlier version of doc, it read indexing an array of shape (10, 20, 30)
with an index shaped (2, 3, 4) but it will throw an IndexError because
the (20,)-shaped subspace cannot be replaced with (2, 3, 4) shaped
broadcasted index subspace.

I updated the example by replacing (2, 3, 4) with (2, 5, 2) to make
the index compatible with the subspace.

@mattip mattip merged commit 27e1129 into numpy:main May 17, 2024
64 of 66 checks passed
@mattip
Copy link
Member

mattip commented May 17, 2024

Thanks @arunppsg

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

Successfully merging this pull request may close these issues.

None yet

2 participants