Skip to content

Conversation

@thiago-carneiro
Copy link
Contributor

The previous implementation clamped stop against domain.shape()[i] (size) instead of origin+shape, causing inverted intervals (start > stop) when origins were non-zero. Updated logic now computes the true exclusive upper bound and clamps correctly. Zero-origin behavior unchanged.

Closes #164

The previous implementation clamped stop against domain.shape()[i] (size) instead of origin+shape, causing inverted intervals (start > stop) when origins were non-zero. Updated logic now computes the true exclusive upper bound and clamps correctly. Zero-origin behavior unchanged.
Copy link
Collaborator

@BrianMichell BrianMichell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good catch, thanks for contributing the fix!

@BrianMichell BrianMichell merged commit 4cbc508 into TGSAI:main Oct 1, 2025
3 checks passed
@BrianMichell BrianMichell added the bug Something isn't working label Oct 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sliceInRange clamps stop against shape() instead of origin+shape for non-zero origins

2 participants