# skbio.tree.TreeNode.ancestors¶

TreeNode.ancestors()[source]

Returns all ancestors back to the root

This call will return all nodes in the path back to root, but does not include the node instance that the call was made from.

Returns: list of TreeNode The path, toward the root, from self

Examples

>>> from six import StringIO
>>> from skbio import TreeNode