pop_states

Contents

pop_states#

class brainstate.graph.pop_states(node, *filters)#

Remove and return ``State``s matching the filters (deduped by identity).

Parameters:
Returns:

The removed states, one mapping per filter.

Return type:

NestedDict | Tuple[NestedDict, ...]

Raises:

ValueError – If no filter is given, or a matched state lives on an immutable node.