Closed fguiotte closed 4 years ago
Hi,
there are indeed 2 different functions in the class Tree
to access to parents:
parent
that accepts either a scalar or an array and returns the parent(s) of the given element(s)parents
that accepts nothing and return the whole parent arrayYou can thus use:
t.parent((0, 11, 8))
I agree that this is not very intuitive and following Python usage, they should probably be the same function. Feel free to open a PR if you want to do this modification (I can guide you in the process if needed).
Ok problem solved!
I think it's fine to have two separate functions, as long as the documentation is clear :slightly_smiling_face:
Hi!
When I try to get the parents list with
Tree.parents()
I get a TypeError: