Skip to content

Conversation

@Eve-ning
Copy link
Owner

@Eve-ning Eve-ning commented Jan 18, 2026

Instead of automatically constructing a new wrapping collection on any along, we check on if it's aligned to create a new ortho alignment.

Also combine IsAligned with IsSequenceable.

We do this to reduce the number of classes we need to consider, there was some annoyance with regards to complex MROs with this many classes and interfaces interlocking each other. The easier design we pitch here is to have alignment be decided by a nully sentinel value of NoAlignment instead of having a separate class.
Previously we thought it was a good idea to put it as a nested list to indicate a new dimension immediately after an `along` call. But this wasn't great as it created a nested list even if the users didn't need that additional dimension. We opted for a simpler route for the data structure by avoiding this nesting.

Also added a handy prop for checking if it's aligned
We'll address the issue of chaining adds and matmul in the next commits
…tion

# Conflicts:
#	ndrect/_is_aligned.py
#	ndrect/ndrect_complex.py
@Eve-ning Eve-ning merged commit cb1b1e2 into main Jan 18, 2026
1 check passed
@Eve-ning Eve-ning deleted the change-strategy-on-alignment-creation branch January 18, 2026 08:57
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.

2 participants