opto.trace.broadcast¶
recursive_conversion ¶
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.
apply_op ¶
A broadcasting operation that applies an op to container of Nodes.
Args: op (callable): the operator to be applied. output (Any): the container to be updated. args (Any): the positional inputs of the operator. *kwargs (Any): the keyword inputs of the operator.