File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -1214,22 +1214,26 @@ def save_inputs_to_json(self, json_file):
12141214
12151215class 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
You can’t perform that action at this time.
0 commit comments