pymc.ode.DifferentialEquation.do_constant_folding#
- DifferentialEquation.do_constant_folding(fgraph, node)#
Determine whether generic constant folding may evaluate the given node.
Return
Falseto prevent generic constant folding from evaluating this node during compilation, even when all its inputs are constants. Graph-dependent decisions about rewrite ordering, consumers, and inplace opportunities belong in specialized rewrites. Such rewrites can use unconditional constant folding after deciding that materializing a node is worthwhile.- Parameters:
- fgraph
FunctionGraph Function graph to which node belongs. This is passed in case the Op needs to inspect the graph to make its decision.
- node
Apply The node for which the constant folding determination is made.
- fgraph
- Returns:
- resbool