Comment #1 on issue 2343 by [email protected]: as_poly returns None
http://code.google.com/p/sympy/issues/detail?id=2343

Can you show how you construct q1? A simple session with isympy gives me this:

In [1]: f = -1 + (S(1)/2 - x/2)**2 + (S(1)/3 - y/3)**2

In [2]: f
Out[2]:
            2          2
     ⎛1   x⎞    ⎛1   y⎞
-1 + ⎜─ - ─⎟  + ⎜─ - ─⎟
     ⎝2   2⎠    ⎝3   3⎠

In [3]: Poly(f)
Out[3]: Poly(1/4*x**2 - 1/2*x + 1/9*y**2 - 2/9*y - 23/36, x, y, domain='QQ')

In [4]: f.as_poly()
Out[4]: Poly(1/4*x**2 - 1/2*x + 1/9*y**2 - 2/9*y - 23/36, x, y, domain='QQ')

In [5]: f.as_poly(x, y)
Out[5]: Poly(1/4*x**2 - 1/2*x + 1/9*y**2 - 2/9*y - 23/36, x, y, domain='QQ')

So it works for me.

--
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