-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
We would like a function that permutes the nodes in dataset into a different ordering, e.g.
def permute_nodes(ds, ordering):
"""
Returns a new dataset in which the tree nodes have been permuted according to the specified ordering
such that node u in the new dataset will be equivalent to ``ordering[u]``.
"""For example, if we wanted to permute the nodes so that they are in preorder (for efficiency in large tree algorithms), we would do
ds_preorder = pk.permute_nodes(ds, pk.preorder(ds))Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels