phylo2vec.stats.cophenetic_distances

phylo2vec.stats.cophenetic_distances#

phylo2vec.stats.cophenetic_distances(vector_or_matrix, unrooted=False)[source]#

Compute the cophenetic distance matrix of a Phylo2Vec vector (topological) or matrix (from branch lengths).

Parameters:

vector_or_matrix (numpy.ndarray) – Phylo2Vec vector (ndim == 1)/matrix (ndim == 2)

Returns:

Cophenetic distance matrix

Return type:

numpy.ndarray