In SymPy, polynomials have extra structure that distinguishes them from
generic expressions. a3 * t**3 + a2 * t**2 + a1 * t + a0 is an expression.
If you create a polynomial in t, it will print with the order of terms
being from highest to lowest.
>>> p = sp.Poly([a3, a2, a1, a0], t)
>>> print
Thanks Leonid for this quick and helpful answer!
I just have a few follow-up questions:
On Thu, Feb 22, 2018 at 11:38 PM, Leonid Kovalev wrote:
> In SymPy, polynomials have extra structure that distinguishes them from
> generic expressions. a3 * t**3 + a2 * t**2 + a1 * t + a0 is an expression.
>
On Fri, Feb 23, 2018 at 5:53 AM, Matthias Geier
wrote:
> Thanks Leonid for this quick and helpful answer!
>
> I just have a few follow-up questions:
>
> On Thu, Feb 22, 2018 at 11:38 PM, Leonid Kovalev wrote:
>> In SymPy, polynomials have extra structure that distinguishes them from
>> generic exp
The LaTeX printing of Poly was indeed buggy. Corrected in the current
development version of SymPy:
>>> latex(Poly([a3, a2, a1, a0], t))
'\\operatorname{Poly}{\\left( a_{3} t^{3} + a_{2} t^{2} + a_{1} t + a_{0},
t, domain=\\mathbb{Z}\\left[a_{0}, a_{1}, a_{2}, a_{3}\\right] \\right)}'
>
--