Skip to content

Commit

Permalink
Fixed the {in,out}_edges() function of the DiGraph class. (#1527)
Browse files Browse the repository at this point in the history
The function ignored their `node` argument, thus they always returned
all edges.
  • Loading branch information
philip-paul-mueller authored Feb 26, 2024
1 parent 2614ef0 commit 6577704
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dace/sdfg/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,10 +526,10 @@ def edges(self):
return [DiGraph._from_nx(e) for e in self._nx.edges()]

def in_edges(self, node):
return [DiGraph._from_nx(e) for e in self._nx.in_edges()]
return [DiGraph._from_nx(e) for e in self._nx.in_edges(node, True)]

def out_edges(self, node):
return [DiGraph._from_nx(e) for e in self._nx.out_edges()]
return [DiGraph._from_nx(e) for e in self._nx.out_edges(node, True)]

def add_node(self, node):
return self._nx.add_node(node)
Expand Down

0 comments on commit 6577704

Please sign in to comment.