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

Commit 4c732db

Browse files
Adapt to new networkX API
1 parent 4ebc5e8 commit 4c732db

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

inferno/extensions/containers/graph.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def is_node_in_graph(self, name):
130130
-------
131131
bool
132132
"""
133-
return name in self.graph.node
133+
return name in self.graph.nodes
134134

135135
def is_source_node(self, name):
136136
"""
@@ -187,7 +187,7 @@ def output_nodes(self):
187187
list
188188
A list of names (str) of the output nodes.
189189
"""
190-
return [name for name, node_attributes in self.graph.node.items()
190+
return [name for name, node_attributes in self.graph.nodes.items()
191191
if node_attributes.get('is_output_node', False)]
192192

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

207207
@property

0 commit comments

Comments
 (0)