Skip to content

BUG: Fix iteration over reversed subspaces in mapiter_@name@. #8296

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

Merged
merged 1 commit into from
Nov 22, 2016

Conversation

charris
Copy link
Member

@charris charris commented Nov 22, 2016

Backport of #8284.

As stated in #8264, before this patch numpy crashes when the
subspace of iterator has negative strides on the faster
resetting branch for trivially iterable subspaces in mapiter_@name@.

Noticing the offset between ptr and first item in subspace is
constant, we calculate the offset from the first iteration and use
it onwards.

Fixes #8264

As stated in numpy#8264, before this patch numpy crashes when the
subspace of iterator has negative strides on the faster
resetting branch for trivially iterable subspaces in mapiter_@name@.

Noticing the offset between ptr and first item in subspace is
constant, we calculate the offset from the first iteration and use
it onwards.

Fixes numpy#8264
@charris charris added this to the 1.12.0 release milestone Nov 22, 2016
@charris charris merged commit 068ce97 into numpy:maintenance/1.12.x Nov 22, 2016
@charris charris deleted the backport-8284 branch November 22, 2016 20:31
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.

2 participants