treelib icon indicating copy to clipboard operation
treelib copied to clipboard

How to join two trees with the same root?

Open ghostku opened this issue 7 years ago • 7 comments

Is there any way to join 2 trees with the same root?

ghostku avatar Dec 30 '17 14:12 ghostku

Not that I know of, but it would be a great feature to add.

Natim avatar Dec 30 '17 16:12 Natim

Related: https://stackoverflow.com/questions/22756518/python-root-two-trees-on-the-same-root-node

Natim avatar Dec 30 '17 16:12 Natim

Yeah, seems useful feature. I am a little busy with job stuff. Are you interested to add this feature? @ghostku Call For Contributor...

caesar0301 avatar Jan 04 '18 16:01 caesar0301

implemented in v1.6.0 release #128

leonardbinet avatar Dec 18 '19 23:12 leonardbinet

Actually the initial PR was ambiguous. There can be two types of paste:

  • either placing a whole new_tree under a node of the initial_tree:
  • either placing a the new_tree root children under a node of the initial_tree (more like a merge of trees on a given mutual node)

I'll propose a PR to clarify this.

leonardbinet avatar Jan 18 '20 14:01 leonardbinet

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)

thomassajot avatar Feb 21 '20 21:02 thomassajot

Hi, this is implemented over here.

https://bigtree.readthedocs.io/en/latest/others/tips.html#merging-trees

kayjan avatar Nov 12 '22 16:11 kayjan