iter_leaf

Contents

iter_leaf#

class brainstate.graph.iter_leaf(node, allowed_hierarchy=(0, 2147483647))#

Iterate over all leaf values in the graph node (non-node values).

Repeated nodes are visited only once. Yields (path, value) pairs.

Return type:

Iterator[tuple[Tuple[Key, ...], Any]]