On Jun 5, 4:51 pm, Scott <[email protected]> wrote: > In [74]: a=(x/sin(x)).series(x, 0, 8) > > In [75]: Poly(a.removeO(),x).coeffs > Out[75]: (31/15120, 7/360, 1/6, 1) > > The remove0 method is perfect. > > The Poly.all_coeffs() does not exist in my sympy 0.6.6 but coeffs did > work.
coeffs will only give the non-zero coefficients, so if you had 3*x**2 - 2, you will not get a 0 in the coefficients given by coeffs: >>> Poly(3*x**2-2).coeffs() [3, -2] >>> So watch out for that. -- You received this message because you are subscribed to the Google Groups "sympy" 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?hl=en.
