Skip to content

Check dtypes on variables instead of numpy arrays#565

Merged
nvaytet merged 2 commits into
mainfrom
fix-dtypes-in-slicing
May 27, 2026
Merged

Check dtypes on variables instead of numpy arrays#565
nvaytet merged 2 commits into
mainfrom
fix-dtypes-in-slicing

Conversation

@nvaytet
Copy link
Copy Markdown
Member

@nvaytet nvaytet commented May 22, 2026

Some inconsistency I found while looking at the code: we were checking for datetime dtype equality between the numpy .values array dtype and the sc.DType.datetime64.

We now check on the Variable dtype.

Edit: The old code actually worked fine, because the equal operators between scipp and numpy dtypes actually function as excpected.

@nvaytet nvaytet marked this pull request as ready for review May 26, 2026 21:00
@nvaytet nvaytet merged commit 70a7e0b into main May 27, 2026
6 checks passed
@nvaytet nvaytet deleted the fix-dtypes-in-slicing branch May 27, 2026 08:17
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