Skip to content
Snippets Groups Projects
Commit fa78a7a4 authored by Dominic Kempf's avatar Dominic Kempf
Browse files

Fix glitch in if/else assertion

parent 3065eb63
No related branches found
No related tags found
No related merge requests found
...@@ -67,7 +67,7 @@ class SympyToPymbolicMapper(SympyLikeToPymbolicMapper): ...@@ -67,7 +67,7 @@ class SympyToPymbolicMapper(SympyLikeToPymbolicMapper):
# We only handle piecewises with 2 arguments! # We only handle piecewises with 2 arguments!
assert len(expr.args) == 2 assert len(expr.args) == 2
# We only handle if/else cases # We only handle if/else cases
assert expr.args[0][1] is True assert expr.args[1][1].is_Boolean and bool(expr.args[1][1]) is True
then = self.rec(expr.args[0][0]) then = self.rec(expr.args[0][0])
else_ = self.rec(expr.args[1][0]) else_ = self.rec(expr.args[1][0])
cond = self.rec(expr.args[0][1]) cond = self.rec(expr.args[0][1])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment