From ee67c45ea6b333bc1e0a99dfd2a98f9df8a234f3 Mon Sep 17 00:00:00 2001 From: Gavin Cooper Date: Tue, 16 Feb 2016 12:22:03 +1100 Subject: [PATCH] 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. --- nipype/workflows/dmri/fsl/dti.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nipype/workflows/dmri/fsl/dti.py b/nipype/workflows/dmri/fsl/dti.py index c12238786d..1d252430b5 100644 --- a/nipype/workflows/dmri/fsl/dti.py +++ b/nipype/workflows/dmri/fsl/dti.py @@ -143,7 +143,7 @@ def bedpostx_parallel(name='bedpostx_parallel', >>> from nipype.workflows.dmri.fsl.dti import bedpostx_parallel >>> params = dict(n_fibres = 2, fudge = 1, burn_in = 1000, ... n_jumps = 1250, sample_every = 25) - >>> bpwf = bedpostx_parallel('nipype_bedpostx_parallel', params) + >>> bpwf = bedpostx_parallel('nipype_bedpostx_parallel', params=params) >>> bpwf.inputs.inputnode.dwi = 'diffusion.nii' >>> bpwf.inputs.inputnode.mask = 'mask.nii' >>> bpwf.inputs.inputnode.bvecs = 'bvecs'