TreeNode.
is_root
()[source]¶Returns True if the current is a root, i.e. has no parent.
State: Experimental as of 0.4.0.
True if the node is the root
bool
See also
Examples
>>> from skbio import TreeNode
>>> tree = TreeNode.read(["((a,b)c);"])
>>> print(tree.is_root())
True
>>> print(tree.find('a').is_root())
False