Home · Quickstart · User Guide and Examples · Interfaces Index · Developers · About · Nipy

# nipype.interfaces.utility.wrappers module

# changing to temporary directories

      >>> tmp = getfixture('tmpdir')
      >>> old = tmp.chdir()

## Function

Link to code

> 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

> function_stra string

>   Code for function.

> Function.output_spec

>   alias of `DynamicTraitedSpec`