Skip to content

Commit 7847628

Browse files
committed
FIX: Reorder encoding dimensions correctly
1 parent 15b4e9d commit 7847628

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nibabel/nifti1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2015,7 +2015,7 @@ def as_reoriented(self, ornt):
20152015

20162016
# Also apply the transform to the dim_info fields
20172017
new_dim = [
2018-
None if orig_dim is None else np.where(ornt[:, 0] == orig_dim)[0]
2018+
None if orig_dim is None else int(ornt[orig_dim, 0])
20192019
for orig_dim in img.header.get_dim_info()]
20202020

20212021
img.header.set_dim_info(*new_dim)

0 commit comments

Comments
 (0)