list(_.iter_all_coeffs()) does what I want. I will still take a look at Mateusz's work.
Thanks for the help guys. Bill smichr wrote: > If you use .iter_all_coeffs() I think you will get what you want: > > ### >>>> Poly(x**2+1,x) > Poly(x**2 + 1, x) >>>> list(_.iter_all_coeffs()) > [1, 0, 1] > ### > > Another option is to compare the coeffs zipped up with the monomials: > > ### >>>> p=Poly(x**2+1,x) >>>> zip(p.coeffs,p.monoms) > [(1, (2,)), (1, (0,))] >>>> p=Poly(x+1,x) >>>> zip(p.coeffs,p.monoms) > [(1, (1,)), (1, (0,))] > ### > > Does that help with what you want to do? > > /c > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sympy@googlegroups.com To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sympy?hl=en -~----------~----~----~----~------~----~------~--~---