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 <distantjob...@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/eda7343d-f557-48b2-85e0-d52162a12bb5n%40googlegroups.com.

-- 
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/CAKgW%3D6J9gJvbDpJzgcsLZ7X7U92F%2Bk1F54bC4QSF%2Bjueh%3DQBBA%40mail.gmail.com.

Reply via email to