Skip to content

Commit 86df501

Browse files
committed
ENH: Use more robust regular expression to identify expansions
1 parent 4ceb4dd commit 86df501

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

nipype/pipeline/engine/utils.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1050,8 +1050,7 @@ 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 any((node.itername.startswith(src_id + '.'),
1054-
node.itername == src_id)):
1053+
if re.match(src_id + r'(\.[a-z]\d+)?$', node.itername):
10551054
expansions[src_id].append(node)
10561055
for in_id, in_nodes in list(expansions.items()):
10571056
logger.debug("The join node %s input %s was expanded"

0 commit comments

Comments
 (0)