Skip to content

Commit 95110ee

Browse files
committed
DOC: Update docstring
1 parent 87c1c27 commit 95110ee

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

nipype/interfaces/base.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1214,22 +1214,26 @@ def save_inputs_to_json(self, json_file):
12141214

12151215
class SimpleInterface(BaseInterface):
12161216
""" An interface pattern that allows outputs to be set in a dictionary
1217+
called ``_results`` that is automatically interpreted by
1218+
``_list_outputs()`` to find the outputs.
12171219
1218-
When implementing `_run_interface`, set outputs with::
1220+
When implementing ``_run_interface``, set outputs with::
12191221
12201222
self._results[out_name] = out_value
12211223
1222-
This can be a way to upgrade a ``Function`` interface to do type checking:
1224+
This can be a way to upgrade a ``Function`` interface to do type checking.
12231225
1226+
Examples
1227+
--------
12241228
>>> def double(x):
12251229
... return 2 * x
1226-
1230+
...
12271231
>>> class DoubleInputSpec(BaseInterfaceInputSpec):
12281232
... x = traits.Float(mandatory=True)
1229-
1233+
...
12301234
>>> class DoubleOutputSpec(TraitedSpec):
12311235
... doubled = traits.Float()
1232-
1236+
...
12331237
>>> class Double(SimpleInterface):
12341238
... input_spec = DoubleInputSpec
12351239
... output_spec = DoubleOutputSpec

0 commit comments

Comments
 (0)