BTW : >>> x, y = symbols("x, y") >>> P = 360*x*y**71*(y**72 - 1)**4 + 360*x**4 *(x**5 - 1)**7 >>> P.args (360*x**4*(x**5 - 1)**7, 360*x*y**71*(y**72 - 1)** 4) >>> P.func.make_args(P) (360*x**4*(x**5 - 1)**7, 360*x*y**71*(y**72 - 1 )**4) >>> P.func.make_args(P)==P.args True
HTH, Le vendredi 28 avril 2023 à 04:05:54 UTC+2, smi...@gmail.com a écrit : > The things you call "coefficients" are called "terms" of the sum. If you > know you have a sum then `eq.args` will give you the terms. If the equation > might have a single term then `Add.make_args(eq)` will give you 1 or more > terms. > > /c > > On Thursday, April 27, 2023 at 12:02:33 PM UTC-5 distan...@gmail.com > wrote: > >> Hello. >> >> How can I get all unexpanded coeffs of a polynomial? >> >> For example, Poly(360*x*y**71*(y**72 - 1)**4 + 360*x**4*(x**5 - 1)**71, >> x).all_coeffs() should return [360*y**71*(y**72 - 1)**4, 360*x**4*(x**5 - >> 1)**71], but, instead, it returns expanded long expression. >> >> How to avoid this and return untouched coeffs? >> >> Thank you. >> > -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sympy+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/92a9d330-1d71-4366-95e7-bedd4ca48171n%40googlegroups.com.