Skip to content
Snippets Groups Projects
Commit c85570db authored by Anne-Liza's avatar Anne-Liza
Browse files

Small bug fix in checks of sort_non_coupled_nodes()

Former-commit-id: bf551ed627e53299f7e10400ab4681ed063696cd
parent c3badd68
No related branches found
No related tags found
No related merge requests found
Pipeline #192754 canceled
...@@ -491,11 +491,11 @@ class DataGraph(KadmosGraph): ...@@ -491,11 +491,11 @@ class DataGraph(KadmosGraph):
for func in nodes: for func in nodes:
assert func in self, "Function node {} must be present in graph.".format(func) assert func in self, "Function node {} must be present in graph.".format(func)
subgraph = self.get_subgraph_by_function_nodes(nodes) subgraph = self.get_subgraph_by_function_nodes(nodes)
subgraph = subgraph.get_function_graph()
assert nx.is_directed_acyclic_graph(subgraph) assert nx.is_directed_acyclic_graph(subgraph)
# Make sure the nodes are in a topological sort # Make sure the nodes are in a topological sort
if self.check_for_coupling(nodes, only_feedback=True): nodes = nx.topological_sort(subgraph)
nodes = nx.topological_sort(subgraph)
nodes_to_sort = list(nodes) nodes_to_sort = list(nodes)
sorted_nodes = [] sorted_nodes = []
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment