Comment #3 on issue 1358 by wflynny: (e*f*e*f).subs(e*f,f*e+h) fails if e*f is not commutative http://code.google.com/p/sympy/issues/detail?id=1358
This patch needs to be more general. I get a lot of errors from the first portion when I compile some of my own code. I think the problem comes from the fact that not all exponentiation has an integer valued exponent. I think the exceptions that I am throwing are caused by the snippet: " if i.is_Pow: for j in range(i.exp): l_temp.append(i.base) #convert (...h**2...) to (...h,h...) " If you have just an exp(I*x), then the range(i.exp) term hits a Wild, not a integer. Thus, even if you just want to just print an expression with some symbolic exponents, things go nuts. Hopefully this helps. -wflynny -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sympy-issues" group. To post to this group, send email to sympy-issues@googlegroups.com To unsubscribe from this group, send email to sympy-issues+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sympy-issues?hl=en -~----------~----~----~----~------~----~------~--~---