Comment #1 on issue 2118 by smichr: subs() doesn't work as expected? http://code.google.com/p/sympy/issues/detail?id=2118
No, subs has some issues. Many of these are fixed in my t2 branch [1] which gives your expected output:
1 + s 1 - s 4*x**2*y**2 2*s*y**2 Meanwhile, either use t2 or try avoid coefficients on your expressions:
z.subs(x**2,s/2)
1 - s [1] https://github.com/smichr/sympy/commits/t2 -- 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.
