mlx.utils.tree_unflatten#
- tree_unflatten = <function tree_unflatten>#
Recreate a Python tree from its flat representation.
from mlx.utils import tree_unflatten d = tree_unflatten([("hello.world", 42)]) print(d) # {"hello": {"world": 42}} d = tree_unflatten({"hello.world": 42}) print(d) # {"hello": {"world": 42}}