Skip to content

Conversation

@seberg
Copy link
Member

@seberg seberg commented Sep 22, 2025

When using a buffered iteration, there was a new assert to check that strides were set up nicely to ensure that we are not missing dimension coalescing.

However, when the strides are set up to track an index, then they were still set up with a 0 for length 1.
I think that is just unnecessary (i.e. the assert is correct to point it out). But, let's do this first for backporting at least.

Closes gh-29690

When using a buffered iteration, there was a new assert to check
that strides were set up nicely to ensure that we are not missing
dimension coalescing.

However, when the strides are set up to track an index, then they
were still set up with a 0 for length 1.
I _think_ that is just unnecessary (i.e. the assert is correct to
point it out).  But, let's do this first for backporting at least.

Signed-off-by: Sebastian Berg <[email protected]>
@seberg seberg added the 09 - Backport-Candidate PRs tagged should be backported label Sep 22, 2025
@mattip mattip merged commit a5abc5c into numpy:main Sep 22, 2025
78 checks passed
@mattip
Copy link
Member

mattip commented Sep 22, 2025

Thanks @seberg

@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label Sep 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: Crash in np.unravel_index if debug assertions enabled.

3 participants