Thanks to all!
On Friday, April 28, 2023 at 9:31:21 AM UTC+3 [email protected] wrote:
> 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, [email protected] 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 [email protected]
>> 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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/sympy/703874c4-be13-492f-ae71-cdfdea22ddd9n%40googlegroups.com.