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

BUG: Ensure too many advanced indices raises an exception #18257

Merged
merged 2 commits into from Jan 29, 2021

Conversation

charris
Copy link
Member

@charris charris commented Jan 29, 2021

Backport of #18150.

The number of indices is limited to 2*MAXDIMS currently to allow
mixing integer indices, e.g. with new indices np.newaxis (one
removes output dimensions, the other adds new ones).
This means that more than MAXDIMS advanced indices can be passed
on to the advanced indexing machinery (MapIterNew), which did
not check for this possibility.

Closes gh-18145

The number of indices is limited to 2*MAXDIMS currently to allow
mixing integer indices, e.g. with new indices `np.newaxis` (one
removes output dimensions, the other adds new ones).
This means that more than MAXDIMS advanced indices can be passed
on to the advanced indexing machinery (`MapIterNew`), which did
not check for this possibility.

Closes numpygh-18145
@charris charris added this to the 1.20.0 release milestone Jan 29, 2021
@charris charris merged commit 32d3696 into numpy:maintenance/1.20.x Jan 29, 2021
@charris charris deleted the backport-18150 branch January 29, 2021 23:05
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