-
Notifications
You must be signed in to change notification settings - Fork 535
Closed
Labels
Description
Summary
In py3 range
is not a list, and if iterfield in MapNode
is defined as range
than entire range is send to the interface at once.
Script/Workflow details
from nipype import Function, MapNode
def square_func(x):
print(x, type(x))
return x ** 2
square = Function(["x"], ["f_x"], square_func)
square_node = MapNode(square, name="square", iterfield=["x"])
square_node.inputs.x = range(4)
res = square_node.run()
Actual behavior
print statement from square_func
gives range(0, 4) <class 'range'>
Expected behavior
print statement from square_func
should give 0 <class 'int'>
, etc.