reduced_node function

(Shortest import: from brian2.codegen.optimisation import reduced_node)

brian2.codegen.optimisation.reduced_node(terms, op)[source]

Reduce a sequence of terms with the given operator

For examples, if terms were [a, b, c] and op was multiplication then the reduction would be (a*b)*c.