Skip to content

Commit 3c13412

Browse files
committed
FIX: Drop JoinNodes, fully specify regex
1 parent 86df501 commit 3c13412

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

nipype/pipeline/engine/utils.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1050,7 +1050,17 @@ def make_field_func(*pair):
10501050
expansions = defaultdict(list)
10511051
for node in graph_in.nodes():
10521052
for src_id in list(old_edge_dict.keys()):
1053-
if re.match(src_id + r'(\.[a-z]\d+)?$', node.itername):
1053+
# Drop the original JoinNodes; only concerned with
1054+
# generated Nodes
1055+
if hasattr(node, 'joinfield'):
1056+
continue
1057+
# Patterns:
1058+
# - src_id : Non-iterable node
1059+
# - src_id.[a-z]\d+ : IdentityInterface w/ iterables
1060+
# - src_id.[a-z]I.[a-z]\d+ : Non-IdentityInterface w/ iterables
1061+
# - src_idJ\d+ : JoinNode(IdentityInterface)
1062+
if re.match(src_id + r'((\.[a-z](I\.[a-z])?|J)\d+)?$',
1063+
node.itername):
10541064
expansions[src_id].append(node)
10551065
for in_id, in_nodes in list(expansions.items()):
10561066
logger.debug("The join node %s input %s was expanded"

0 commit comments

Comments
 (0)