Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix NXdetector for 0-D detector_number field. #16

Merged
merged 4 commits into from
Apr 11, 2022
Merged

Conversation

SimonHeybrock
Copy link
Member

This also matters when shape=(1,) since this is considered equivalent to shape=() in Nexus

This also matters when shape=(1,) since this is considered equivalent
to shape=() in Nexus
assert detector.shape == []
loaded = detector[...]
assert sc.identical(loaded.bins.size().data,
sc.array(dims=[], unit=None, dtype='int64', values=2))
Copy link
Member

Choose a reason for hiding this comment

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

This is a bit odd. Why didn't you use sc.scalar?

@SimonHeybrock SimonHeybrock merged commit c994c5f into main Apr 11, 2022
@SimonHeybrock SimonHeybrock deleted the fix-0d-detector branch April 11, 2022 10:07
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