Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Commit

Permalink
Adapt to new networkX API
Browse files Browse the repository at this point in the history
  • Loading branch information
constantinpape committed Feb 15, 2020
1 parent 4ebc5e8 commit 4c732db
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions inferno/extensions/containers/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def is_node_in_graph(self, name):
-------
bool
"""
return name in self.graph.node
return name in self.graph.nodes

def is_source_node(self, name):
"""
Expand Down Expand Up @@ -187,7 +187,7 @@ def output_nodes(self):
list
A list of names (str) of the output nodes.
"""
return [name for name, node_attributes in self.graph.node.items()
return [name for name, node_attributes in self.graph.nodes.items()
if node_attributes.get('is_output_node', False)]

@property
Expand All @@ -201,7 +201,7 @@ def input_nodes(self):
list
A list of names (str) of the input nodes.
"""
return [name for name, node_attributes in self.graph.node.items()
return [name for name, node_attributes in self.graph.nodes.items()
if node_attributes.get('is_input_node', False)]

@property
Expand Down

0 comments on commit 4c732db

Please sign in to comment.