From a425943dba3c133a004ce3e23fd498dad371786e Mon Sep 17 00:00:00 2001 From: Yan Wong Date: Sat, 7 Jun 2025 15:15:12 +0100 Subject: [PATCH] Add a note about which it the most efficient traversal method Fixes #3198 --- docs/python-api.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/python-api.md b/docs/python-api.md index 1ccf28d0ff..14cf33f16a 100644 --- a/docs/python-api.md +++ b/docs/python-api.md @@ -546,7 +546,8 @@ order. Often, given a particular order, it is convenient to iterate over each no using the {meth}`Tree.nodes` method. However, for high performance algorithms, it may be more convenient to access the node indices for a particular order as an array, and use this, for example, to index into one of the node arrays (see -{ref}`sec_topological_analysis_traversal`). +{ref}`sec_topological_analysis_traversal`). Note that the most efficient of these +methods is {meth}`Tree.preorder`. ```{eval-rst} Iterator access