Re: [sympy] Unexpanded coefficients of a polynomial

2023-04-27 Thread Aaron Meurer
Poly is designed to expand all polynomials out. If you just want the terms of an expression as you've written it you can use Add.make_args(). I wouldn't really call these the "coefficients" of the expression though. Aaron Meurer On Thu, Apr 27, 2023 at 11:02 AM Paul Royik wrote: > > Hello. > >

[sympy] Unexpanded coefficients of a polynomial

2023-04-27 Thread Paul Royik
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