Skip to content

Allow zero strides on empty arrays - #1611

Merged
akern40 merged 1 commit into
rust-ndarray:masterfrom
Guflly:fix/empty-zero-strides
Oct 19, 2026
Merged

akern40 merged 1 commit into
rust-ndarray:masterfrom
Guflly:fix/empty-zero-strides

Conversation

@Guflly

@Guflly Guflly commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Treat shapes with an empty axis as non-overlapping when validating mutable views.

This allows zero strides on empty arrays while keeping the existing overlap checks for non-empty shapes.

Fixes #1609

Tests:

  • cargo test -F approx,serde,rayon
  • cargo test --no-default-features
  • cargo +nightly fmt --all --check

@akern40
akern40 force-pushed the fix/empty-zero-strides branch from c071473 to 5abc12e Compare October 18, 2026 23:55
@akern40
akern40 enabled auto-merge (squash) October 18, 2026 23:56
@akern40
akern40 merged commit 34d4e13 into rust-ndarray:master Oct 19, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Empty Array lead to "The strides must not allow any element to be referenced by two different indices"

2 participants