Updates:
        Status: Started
        Owner: mattpap
        Cc: -mattpap
        Labels: Polynomial Milestone-Release0.7.0 NeedsReview

Comment #2 on issue 1790 by mattpap: unnecessarily restriction on monomial ordering
http://code.google.com/p/sympy/issues/detail?id=1790

This restriction was removed in polys11 branch. Now a callable object (with __call__ attribute) can be used as a value to 'order' argument. Note also that the behaviour of 'order' was changed and now it uses key-functions instead of cmp-functions, following paradigm switch in Python.

Example:

In [1]: Poly(x**2*y**3*z + x**2*y*z**3 + x*y*z + 1).terms(order='lex')
Out[1]: [((2, 3, 1), 1), ((2, 1, 3), 1), ((1, 1, 1), 1), ((0, 0, 0), 1)]

In [2]: rev_lex = lambda monom: tuple(reversed(monom))

In [3]: Poly(x**2*y**3*z + x**2*y*z**3 + x*y*z + 1).terms(order=rev_lex)
Out[3]: [((2, 1, 3), 1), ((2, 3, 1), 1), ((1, 1, 1), 1), ((0, 0, 0), 1)]


--
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.

Reply via email to