Exemplo n.º 1
0
 def project_one(subexpr):
     from pymbolic.primitives import is_constant
     if self.dd_in == self.dd_out:
         # no-op projection, go away
         return subexpr
     elif is_constant(subexpr):
         return subexpr
     else:
         from grudge.symbolic.primitives import OperatorBinding
         return OperatorBinding(self, subexpr)
Exemplo n.º 2
0
 def bind_one(subexpr):
     if is_zero(subexpr):
         return subexpr
     else:
         from grudge.symbolic.primitives import OperatorBinding
         return OperatorBinding(self, subexpr)