Updates:
Status: Invalid
Comment #1 on issue 2591 by [email protected]:
expr.as_ordered_terms("grlex")[0] gives the wrong term
http://code.google.com/p/sympy/issues/detail?id=2591
This is actually not a bug, because in the first case x > t, but in the
other t > x:
In [1]: f = Poly(x*t**3 + t**4 + 1, x, t)
In [2]: f
Out[2]: Poly(x*t**3 + t**4 + 1, x, t, domain='ZZ')
In [3]: sstr(f.as_expr(), order='grlex')
Out[3]: t**4 + t**3*x + 1
It would be nice, however, if it was possible to set the order of variables
in printer. In polys you can achieve this by explicitly setting generators
or with 'sort' option:
In [1]: g = x*t**3 + t**4 + 1
In [2]: Poly(g).LM('grlex')
Out[2]: (1, 3)
In [3]: Poly(g, sort='t > x').LM('grlex')
Out[3]: (4, 0)
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sympy-issues?hl=en.