You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to list all leafs in a given subtree of the merge tree created by
to_tree, it fails in some cases with 'Index out of bounds'
What steps will reproduce the problem?
Run the following code to get the exception:
from hcluster import *
dist = [1, 1, 1, 1, 2, 2, 2, 3, 3, 4]
x = linkage(dist)
t = to_tree(x)
t.right.right.pre_order()
What version of the product are you using? On what operating system?
I'm using the port py26-hcluster version 0.2.0 on OS X 10.6 with Python 2.6.
Please provide any additional information below.
Looking at hierarchy.py (revision 132), it looks like the problem is that the
lists lvisited and rvisited (line 752 and 753) are indexed using node IDs,
while their size is 2*n (n is the size of the subtree in that node). If the
tree is large enough, the node ID of the (for example) rightmost leaf is
actually larger than 2*n for most subtrees containing it.
Original issue reported on code.google.com by ondra...@gmail.com on 20 Jul 2010 at 9:30
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
ondra...@gmail.com
on 20 Jul 2010 at 9:30The text was updated successfully, but these errors were encountered: