# skbio.tree.TreeNode.tip_tip_distances¶

TreeNode.tip_tip_distances(endpoints=None)[source]

Returns distance matrix between pairs of tips, and a tip order.

State: Experimental as of 0.4.0.

By default, all pairwise distances are calculated in the tree. If endpoints are specified, then only the distances between those tips are computed.

Parameters

endpoints (list of TreeNode or str, or None) – A list of TreeNode objects or names of TreeNode objects

Returns

The distance matrix

Return type

DistanceMatrix

Raises

ValueError – If any of the specified endpoints are not tips

Notes

If a node does not have an associated length, 0.0 will be used and a RepresentationWarning will be raised.

Examples

>>> from skbio import TreeNode