Closed YaosenLin closed 3 years ago
dists = sorted(d[c]+c.edge_length for c in node.children) d[node] = dists[-1]; max_pair = dists[-1]+dists[-2]
the dists[-2] can cause index out of range exception.
dists[-2]
Thanks for catching that, and sorry for the delay! Fixed in TreeSwift v1.1.17:
https://github.com/niemasd/TreeSwift/blob/ea90060a1570fbdf013762504a83fec3741e436e/treeswift/Tree.py#L295-L300
the
dists[-2]
can cause index out of range exception.