Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 2710 by brad.froehle: Cannot simplify Piecewise
http://code.google.com/p/sympy/issues/detail?id=2710

If one uses an "otherwise" option in Piecewise, sympy is unable to simplify:

from sympy.abc import a
from sympy import Piecewise
f = Piecewise((0, a>0), (1, True))
f.simplify()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
File "/usr/lib/pymodules/python2.7/sympy/core/expr.py", line 1905, in simplify
    return simplify(self)
File "/usr/lib/pymodules/python2.7/sympy/simplify/simplify.py", line 1637, in simplify
    expr = powsimp(expr, combine='exp', deep=True)
File "/usr/lib/pymodules/python2.7/sympy/simplify/simplify.py", line 1200, in powsimp
    return expr.func(*[powsimp(t, deep, combine, force) for t in expr.args])
File "/usr/lib/pymodules/python2.7/sympy/simplify/simplify.py", line 1200, in powsimp
    return expr.func(*[powsimp(t, deep, combine, force) for t in expr.args])
File "/usr/lib/pymodules/python2.7/sympy/simplify/simplify.py", line 1187, in powsimp
    if expr.is_Pow:
AttributeError: 'bool' object has no attribute 'is_Pow'


--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en.

Reply via email to