phylo2vec.utils.vector.add_leaf

Contents

phylo2vec.utils.vector.add_leaf#

phylo2vec.utils.vector.add_leaf(v, leaf, pos) ndarray[source]#

Add a leaf to a Phylo2Vec vector v

Parameters:
  • v (numpy.ndarray) – Phylo2Vec vector

  • leaf (int >= 0) – A leaf node to add

  • pos (int >= 0) – A branch from where the leaf will be added

Returns:

v_add – Phylo2Vec vector including the new leaf

Return type:

numpy.ndarray