archimedes.treeยถ
Utilities for working with hierarchical โpytreeโ data structures.
Functions
|
Check if all leaves in the pytree evaluate to True. |
|
Flatten a pytree into a list of leaves and a treedef. |
|
Extract all leaf values from a pytree. |
|
Apply a function to each leaf in a pytree. |
|
Flatten a pytree to a single 1D array. |
|
Reduce a pytree to a single value using a function and initializer. |
|
Register a dataclass as a pytree node with customized field handling. |
|
Register a custom type as a pytree node. |
|
Extract the structure of a pytree without the leaf values. |
|
Reconstruct a pytree from a list of leaves and a treedef. |