For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).
Python function
flatten
flatten()
max.experimental.tree_utils.flatten(tree, *, leaf=None, shared=False)
Splits tree into its leaves and the structure around them.
-
Parameters:
-
Returns:
-
The leaves, left to right, and the
TreeDefthat rebuilds them. -
Raises:
-
- TypeError – If a
dictintreehas keys that are not mutually sortable. - ValueError – If
treeholds a cycle this walk cannot express.
- TypeError – If a
-
Return type: