phylo2vec.stats.incidence#
- phylo2vec.stats.incidence(vector, format='coo')[source]#
Compute the incidence matrix of a Phylo2Vec vector.
- Parameters:
vector (numpy.ndarray) – Phylo2Vec vector (ndim == 1)
format (str, optional) – Format of the incidence matrix, by default “coo”
- Returns:
Incidence matrix in the specified format
- Return type:
numpy.ndarray or List[List[int], List[int], List[int]] or Dict[Tuple[int, int], int]