nipype.interfaces.utility.wrappers module¶
- # changing to temporary directories
>>> tmp = getfixture('tmpdir') >>> old = tmp.chdir()
Function¶
Bases: IOBase
Runs arbitrary function as an interface
Examples
>>> func = 'def func(arg1, arg2=5): return arg1 + arg2' >>> fi = Function(input_names=['arg1', 'arg2'], output_names=['out']) >>> fi.inputs.function_str = func >>> res = fi.run(arg1=1) >>> res.outputs.out 6
- Mandatory Inputs:
function_str (a string) – Code for function.
- Function.output_spec¶
alias of
DynamicTraitedSpec