Skip to content
Snippets Groups Projects

Fix converting UnevaluatedExpr to pymbolic

Open Isuru Fernando requested to merge isuruf/pymbolic:convert into master
1 unresolved thread

Merge request reports

Pipeline passed for fd8921bd on isuruf:convert

Approval is optional
Test summary results are being parsed
The target branch master does not exist. Please restore it or use a different target branch.

Merge details

  • 1 commit and 1 merge commit will be added to master.
  • Source branch will not be deleted.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
112 112 self.rec(expr.args[0]), expr.prefix)
113 113
114 114 def map_UnevaluatedExpr(self, expr): # noqa
115 return self.rec(expr.args[0])
115 return prim.CommonSubexpression(self.rec(expr.args[0]), None)
  • I'm not sure I buy that these two (CSE and UnevaluatedExpr) really correspond to each other well. CSE just means, "hey, this subtree may be shared somewhere else", but it doesn't have any implication on rewriting. What are the semantics of UnevaluatedExpr on the sympy end?

  • What are the semantics of UnevaluatedExpr on the sympy end?

    In sympy, expression inside UnevaluatedExpr stays as one node and doesn't combine with others. For example, UnevaluatedExpr(x+y) + y is kept as is and doesn't become x+2*y.

  • Please register or sign in to reply
Please register or sign in to reply
Loading