Skip to content

Commit 7a8eb07

Browse files
committed
FSL FNIRT: fix python3 issue with dict values and map
1 parent 1a4db10 commit 7a8eb07

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nipype/interfaces/fsl/preprocess.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -991,7 +991,7 @@ def _format_arg(self, name, spec, value):
991991
if name in ('in_intensitymap_file', 'out_intensitymap_file'):
992992
if name == 'out_intensitymap_file':
993993
value = self._list_outputs()[name]
994-
value = map(FNIRT.intensitymap_file_basename, value)
994+
value = [FNIRT.intensitymap_file_basename(v) for v in value]
995995
assert len(set(value)) == 1, (
996996
'Found different basenames for {}: {}'.format(name, value))
997997
return spec.argstr % value[0]
@@ -1027,7 +1027,7 @@ def intensitymap_file_basename(cls, f):
10271027
"""Removes valid intensitymap extensions from `f`, returning a basename
10281028
that can refer to both intensitymap files.
10291029
"""
1030-
for ext in Info.ftypes.values() + ['.txt']:
1030+
for ext in list(Info.ftypes.values()) + ['.txt']:
10311031
if f.endswith(ext):
10321032
return f[:-len(ext)]
10331033
# TODO consider warning for this case

0 commit comments

Comments
 (0)