treelib
treelib copied to clipboard
How to join two trees with the same root?
Is there any way to join 2 trees with the same root?
Not that I know of, but it would be a great feature to add.
Related: https://stackoverflow.com/questions/22756518/python-root-two-trees-on-the-same-root-node
Yeah, seems useful feature. I am a little busy with job stuff. Are you interested to add this feature? @ghostku Call For Contributor...
implemented in v1.6.0 release #128
Actually the initial PR was ambiguous. There can be two types of paste
:
- either placing a whole
new_tree
under a node of theinitial_tree
: - either placing a the
new_tree
root children under a node of theinitial_tree
(more like a merge of trees on a given mutual node)
I'll propose a PR to clarify this.
I am also interested in this feature. Is there an updated estimate of the release of 1.6.0 ? (https://github.com/caesar0301/treelib/issues/128 mentions 01/24/2020)
Hi, this is implemented over here.
https://bigtree.readthedocs.io/en/latest/others/tips.html#merging-trees