Skip to content

Commit

Permalink
Re: Issue #2 needs a formal overhaul of find_root/find_parent logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Wylie committed Jan 12, 2014
1 parent c10dbf0 commit 71a0124
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion data_hacking/hcluster/hcluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 71a0124

Please sign in to comment.