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: use shape of grouping and not shape of grouping + shape of signal #262

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/scippnexus/nxdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,9 @@ def _init_group_dims(
if self._signal is None:
self._valid = False
elif isinstance(self._signal, EventField):
# EventField uses dims of detector_number (the grouping) plus dims of event
# data. The former may be defined by the group dims.
if group_dims is not None:
self._signal._grouping.sizes = dict(
zip(group_dims, self._signal.shape, strict=False)
zip(group_dims, self._signal._grouping.shape, strict=False)
)
group_dims = self._signal.dims
else:
Expand Down