-
Notifications
You must be signed in to change notification settings - Fork 67
Open
Description
A Piecewise
does not give a tuple of tuple as args
. This makes it incompatible with sympy.
expr = symengine.Piecewise((symengine.Symbol("x"), symengine.Symbol("y") > 0), (symengine.Symbol("k"), symengine.Symbol("w") > 0))
print(symengine.unicode(expr))
⎧x if 0 < y
⎨
⎩k if 0 < w
expr.args
>>> (x, 0 < y, k, 0 < w)
import sympy
sympy.sympify(expr).args
>>> ((x, y > 0), (k, w > 0))
Metadata
Metadata
Assignees
Labels
No labels