Closed
Description
Summary
In the current HEAD, the new behaviour of the Merge interface when numinputs==1
breaks cases (such as mine) where the numinputs
is set at runtime depending on parameters of the workflow creation code. A better way to handle this would be to see if in_lists
is defined or perhaps use numinputs
==None.
Actual behavior
TypeError: '_Undefined' object is not iterable
Expected behavior
in1
is taken to be the only element of the merged list
How to replicate the behavior
import nipype.pipeline.engine as pe
from nipype.interfaces.utility.base import Merge
merge = pe.Node(Merge(numinputs=1), name='merge')
merge.inputs.in1 = 1
workflow = pe.Workflow(name='workflow')
workflow.add_nodes([merge])
workflow.run()
Platform details:
please paste the output of: python -c "import nipype; print(nipype.get_info()); print(nipype.__version__)"
{'nibabel_version': '2.0.1', 'sys_executable': '/usr/local/opt/python/bin/python2.7', 'networkx_version': '1.11', 'numpy_version': '1.12.0', 'sys_platform': 'darwin', 'sys_version': '2.7.13 (default, Dec 17 2016, 23:03:43) \n[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)]', 'commit_source': u'repository', 'commit_hash': '368e184', 'pkg_path': '/Users/tclose/git/nipype/nipype', 'nipype_version': u'0.13.0-g368e184.dev', 'traits_version': '4.6.0', 'scipy_version': '0.14.0'}
0.13.0-g368e184.dev