From af5599b1c315fbec9531bfbd36e2dd2b70c9d680 Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Sat, 12 Dec 2009 11:50:53 +0100 Subject: [PATCH] [entropy.graph] fix trans_vals function declaration --- libraries/entropy/graph.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/entropy/graph.py b/libraries/entropy/graph.py index 91c40a52f..c25f981c2 100644 --- a/libraries/entropy/graph.py +++ b/libraries/entropy/graph.py @@ -397,9 +397,6 @@ class Graph(object): Protected method, the only difference is that this method returns GraphNode objects relations. """ - def trans_vals(node_list): - return tuple([x.item() for x in node_list]) - adj_map = self.get_adjacency_map() sorter = TopologicalSorter(adj_map) return sorter.sort() @@ -417,6 +414,9 @@ class Graph(object): @return: sorted graph representation @rtype: dict """ + def trans_vals(node_list): + return tuple([x.item() for x in node_list]) + sorted_data = self._solve() return dict((x, trans_vals(y),) for x, y in sorted_data.items())