Skip to content

Commit 4426e88

Browse files
Handle array symbolics in CSE topological_sort
Co-authored-by: Aayush Sabharwal <aayush.sabharwal@gmail.com>
1 parent 700a8c6 commit 4426e88

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/code.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -727,6 +727,12 @@ function topological_sort(graph)
727727
push!(sorted_nodes, sym new_node)
728728
visited[node] = sym
729729
return sym
730+
elseif _is_array_of_symbolics(node)
731+
new_node = map(dfs, node)
732+
sym = newsym(typeof(new_node))
733+
push!(sorted_nodes, sym new_node)
734+
visited[node] = sym
735+
return sym
730736
else
731737
visited[node] = node
732738
return node

0 commit comments

Comments
 (0)