skbio.tree.TreeNode.extend#
- TreeNode.extend(nodes, uncache=True)[source]#
Add a list of nodes to self’s children.
- Parameters:
See also
Notes
This method will remove existing parents of the nodes if they have any, set their parents to self, and add the nodes to the end of self’s children.
The
uncacheparameter applies to both donor and recipient trees.Examples
>>> from skbio import TreeNode >>> root = TreeNode(name="root") >>> root.extend([TreeNode(name="child1"), TreeNode(name="child2")]) >>> print(root) (child1,child2)root;