Re: Issue 3877 in sympy: subs should recognize powers with exponent 1

2013-06-11 Thread sympy
Comment #4 on issue 3877 by asmeu...@gmail.com: subs should recognize powers with exponent 1 http://code.google.com/p/sympy/issues/detail?id=3877 Or if the logic is not too complicated we could just reimplement it in Symbol for the special case of exp = 1. -- You received this message bec

Re: Issue 3877 in sympy: subs should recognize powers with exponent 1

2013-06-11 Thread sympy
Comment #3 on issue 3877 by smi...@gmail.com: subs should recognize powers with exponent 1 http://code.google.com/p/sympy/issues/detail?id=3877 That might not work if Pow._eval_subs is expecting self to have base and exp attributes. -- You received this message because this project is con

Re: Issue 3877 in sympy: subs should recognize powers with exponent 1

2013-06-10 Thread sympy
Comment #2 on issue 3877 by asmeu...@gmail.com: subs should recognize powers with exponent 1 http://code.google.com/p/sympy/issues/detail?id=3877 Instead of creating a dummy Pow, just call Pow._eval_subs. -- You received this message because this project is configured to send all issue not

Re: Issue 3877 in sympy: subs should recognize powers with exponent 1

2013-06-10 Thread sympy
Comment #1 on issue 3877 by smi...@gmail.com: subs should recognize powers with exponent 1 http://code.google.com/p/sympy/issues/detail?id=3877 def _eval_subs(self, old, new): ... if old == self: ... return new ... if old.is_Pow: ... return Pow(self, 1, evaluate=Fals

Issue 3877 in sympy: subs should recognize powers with exponent 1

2013-06-09 Thread sympy
Status: Valid Owner: Labels: Type-Defect Priority-Medium New issue 3877 by asmeu...@gmail.com: subs should recognize powers with exponent 1 http://code.google.com/p/sympy/issues/detail?id=3877 In [31]: (sqrt(x)**3 + sqrt(x) + x + x**2).subs(sqrt(x), y) Out[31]: 43 x + y + y +