opto.trace.broadcast
#
Module Contents#
Functions#
Recursively apply true_func to the nodes and false_func to the rest of the objects in a container of nodes. Container of nodes are tuple, list, dict, set, and NodeContainer. |
|
A broadcasting operation that applies an op to container of Nodes. |
API#
- recursive_conversion(true_func, false_func)[source]#
Recursively apply true_func to the nodes and false_func to the rest of the objects in a container of nodes. Container of nodes are tuple, list, dict, set, and NodeContainer.
- Args:
true_func (callable): the function to be applied to the nodes. false_func (callable): the function to be applied to the rest of the objects.