-
Notifications
You must be signed in to change notification settings - Fork 54
Open
Description
What happened?
In
def init_bbreg_wf( |
currently, the output of
def compare_xforms(lta_list, norm_threshold=15): |
np.bool
instead of a bool
. So when we pass that to the select_transform.inputs.index
in (compare_transforms, select_transform, [('out', 'index')]), |
traits.trait_errors.TraitError: Each element of the 'index' trait of a SelectInputSpec instance must be an integer, but a value of np.False_ <class 'numpy.bool'> was specified.
Using, say, False
as an input to the same parameter works fine. I have attached some code to reproduce the issue.
What command did you use?
from nipype.interfaces import utility as niu
from nipype.pipeline import engine as pe
import numpy as np
select_transform = pe.Node(niu.Select(), run_without_submitting=True, name='select_transform')
# the following fails
select_transform.inputs.trait_set(inlist=[1, 2, 3], index=np.False_)
## Gives the error
## traits.trait_errors.TraitError: Each element of the 'index' trait of a SelectInputSpec instance must be an integer, but a value of np.False_ <class 'numpy.bool'> was specified.
# but the following works
select_transform.inputs.trait_set(inlist=[1, 2, 3], index=False)
out = select_transform.run()
out.outputs.out
## returns the first element of inlist
## 1
What version of the software are you running?
1.12.1
How are you running this software?
Docker
Is your data BIDS valid?
Yes
Are you reusing any previously computed results?
FreeSurfer
Please copy and paste any relevant log output.
Additional information / screenshots
No response