From 71a01244271648ccc647f7e1199d01cc38b0ed88 Mon Sep 17 00:00:00 2001 From: Brian Wylie Date: Sun, 12 Jan 2014 12:18:52 -0700 Subject: [PATCH] Re: Issue #2 needs a formal overhaul of find_root/find_parent logic --- data_hacking/hcluster/hcluster.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/data_hacking/hcluster/hcluster.py b/data_hacking/hcluster/hcluster.py index 899a7f7..cc5e9aa 100644 --- a/data_hacking/hcluster/hcluster.py +++ b/data_hacking/hcluster/hcluster.py @@ -285,7 +285,8 @@ def find_root(self, G, node): root = G.predecessors(root)[0] return root - def find_parent(self, G, node): + def find_parent(self, G, node, root=True): + if root: return self.find_root(G, node) # Temp hack for testing return G.predecessors(node)[0] def common_features(self, G, root):