phylo2vec.to_pairs

Contents

phylo2vec.to_pairs#

phylo2vec.to_pairs(v: ndarray) List[Tuple[int, int]][source]#

Convert a Phylo2Vec vector to a list of pairs

Each pair is represented as a tuple (B, L) indicating that leaf L descends from branch B.

Parameters:

v (numpy.ndarray) – Phylo2Vec vector

Returns:

pairs – List of (branch, leaf) pairs

Return type:

List[Tuple[int, int]]