Skip to content

Commit ee67c45

Browse files
committed
Update example to prevent obscuring passed params
Example in source code comments can introduce bug in user code if followed blindly, passing `params` as positional argument actually gets it assigned to parameter named `compute_all_outputs`, meaning `params` gets default values. Fix is to explicitly use named argument in function call.
1 parent befd4f8 commit ee67c45

File tree

1 file changed

+1
-1
lines changed
  • nipype/workflows/dmri/fsl

1 file changed

+1
-1
lines changed

nipype/workflows/dmri/fsl/dti.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def bedpostx_parallel(name='bedpostx_parallel',
143143
>>> from nipype.workflows.dmri.fsl.dti import bedpostx_parallel
144144
>>> params = dict(n_fibres = 2, fudge = 1, burn_in = 1000,
145145
... n_jumps = 1250, sample_every = 25)
146-
>>> bpwf = bedpostx_parallel('nipype_bedpostx_parallel', params)
146+
>>> bpwf = bedpostx_parallel('nipype_bedpostx_parallel', params=params)
147147
>>> bpwf.inputs.inputnode.dwi = 'diffusion.nii'
148148
>>> bpwf.inputs.inputnode.mask = 'mask.nii'
149149
>>> bpwf.inputs.inputnode.bvecs = 'bvecs'

0 commit comments

Comments
 (0)