phylo2vec.from_ancestry

Contents

phylo2vec.from_ancestry#

phylo2vec.from_ancestry(ancestry: ndarray) ndarray[source]#

Convert an “ancestry matrix” to a vector

Parameters:

ancestry (np.ndarray) – Ancestry matrix 1st column: child 1 2nd column: child 2 3rd column: parent node

Returns:

Phylo2Vec vector

Return type:

numpy.ndarray