Skip to content

Commit

Permalink
Fix incorrect index
Browse files Browse the repository at this point in the history
  • Loading branch information
wtclarke committed Oct 23, 2024
1 parent 5d837cc commit 7f89fe8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/nifti_mrs/nifti_mrs.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ def set_dim_tag(self, dim, tag, info=None, header=None):
# If tag is None, check that the dimension is singleton
if tag is None and self.ndim > dim and self.shape[dim] > 1:
raise ValueError('Tag cannot be set to None for non-singleton dimension.')
if tag is None and self.ndim > dim:
if tag is None and self.ndim > (dim + 1):
raise ValueError('Tag can only be set to None for trailing singleton dimension.')

if header is not None:
Expand Down

0 comments on commit 7f89fe8

Please sign in to comment.