phylo2vec.from_edges

Contents

phylo2vec.from_edges#

phylo2vec.from_edges(edges: List[Tuple[int, int]]) ndarray[source]#

Convert a list of edges to a Phylo2Vec vector

Each edge is represented as a list of two nodes (child, parent)

Parameters:

edges (List[Tuple[int, int]]) – List of (child, parent) edges

Returns:

v – Phylo2Vec vector

Return type:

numpy.ndarray