In [33]: Poly(3*x*y + 2*x**2 + 3*y*x**2).coeffs()
Out[33]: [3, 2, 3]
This uses lex order by default, but you can use any ordering.
monoms works for me:
In [29]: Poly(3*x*y + 2*x**2 + 3*y*x**2).monoms()
Out[29]: [(2, 1), (2, 0), (1, 1)]
You can easily combine these to get the coefficients by term. We
don't have specific functions to get a coefficient matrix, but it
should be pretty straight forward to get using these functions.
Aaron Meurer
> --
> You received this message because you are subscribed to the Google Groups "sympy" group.
> To post to this group, send email to sy...@googlegroups.com.
> To unsubscribe from this group, send email to sympy+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
>