Updates: Status: Started Comment #3 on issue 1219 by ondrej.certik: .coeff() fails for -x/8 + x*y http://code.google.com/p/sympy/issues/detail?id=1219
After fixing the issue 1220, it will behave like this: In [1]: p = -x/8 + x*y In [2]: p.coeff(x) Out[2]: -1/8 + y In [3]: p.coeff(-x) Out[3]: -y In [4]: p.coeff(y) Out[4]: x And after fixing the issue 1221, it should behave like this: In [1]: p = -x/8 + x*y In [2]: p.coeff(x) Out[2]: -1/8 + y In [3]: p.coeff(-x) Out[3]: -y+1/8 In [4]: p.coeff(y) Out[4]: x A simple workaround for the issue 1220 is: $ git diff diff --git a/sympy/core/basic.py b/sympy/core/basic.py index d13eee5..0f31309 100644 --- a/sympy/core/basic.py +++ b/sympy/core/basic.py @@ -1525,7 +1525,7 @@ class Basic(AssumeMeths): return expr = collect(self, x) symbols = list(x.atoms(Symbol)) - w = Wild("coeff", exclude=symbols) + w = Wild("w", exclude=symbols) m = expr.match(w*x+Wild("rest")) if m: return m[w] -- 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sympy-issues?hl=en -~----------~----~----~----~------~----~------~--~---