From 4c732db6e615048c3ac8b06c3e00213f4634e2a0 Mon Sep 17 00:00:00 2001 From: Constantin Pape Date: Sat, 15 Feb 2020 15:18:36 +0100 Subject: [PATCH] Adapt to new networkX API --- inferno/extensions/containers/graph.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/inferno/extensions/containers/graph.py b/inferno/extensions/containers/graph.py index 0bbf57b0..45e82286 100755 --- a/inferno/extensions/containers/graph.py +++ b/inferno/extensions/containers/graph.py @@ -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): """ @@ -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 @@ -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