Skip to content

Commit ab2e801

Browse files
committed
FIX: Set default t_code even if no t_zoom
1 parent cc532e3 commit ab2e801

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

nibabel/nifti1.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1692,8 +1692,9 @@ def get_zooms(self, units=None, raise_unknown=False):
16921692
if xyz_code == 'unknown':
16931693
xyz_msg = 'Unknown spatial units'
16941694
xyz_code = 'mm'
1695-
if t_code == 'unknown' and t_zoom is not None:
1696-
t_msg = 'Unknown time units'
1695+
if t_code == 'unknown':
1696+
if t_zoom is not None:
1697+
t_msg = 'Unknown time units'
16971698
t_code = 'sec'
16981699
if raise_unknown and (xyz_msg, t_msg) != ('', ''):
16991700
if xyz_msg and t_msg:

0 commit comments

Comments
 (0)