It's also possible to specify a custom ordering, depending on how much
work you want to put into this. I forget how to do it, but I think the
code is near the Groebner basis code.

You could also try subclassing the printer with a custom printer for
Add. Again, it would be more work, so it really depends on what you
need it for. If you are just doing stuff interactively (i.e., using
SymPy as a calculator), it's probably not worth it.

Aaron Meurer

On Wed, Jan 16, 2013 at 6:40 AM, Sergiu Ivanov
<sergiu.v.iva...@gmail.com> wrote:
> Hello,
>
> On Wed, Jan 16, 2013 at 04:09:07AM -0800, David Ketcheson wrote:
>>
>> What options are available for specifying the order in which terms are
>> printed?  If I do
>
> [...]
>
>> I think I know what the logic here is, but I'd like to order terms by
>> increasing order of derivative (or increasing powers of h). How can I do
>> that?
>
> Try using the -o option of isympy:
>
> -o ORDER, --order ORDER
>
>     Setup the ordering of terms for printing.  The default is lex, which
>     orders terms lexicographically (e.g., x**2 + x + 1). You can choose
>     other orderings, such as rev-lex, which will use reverse
>     lexicographic ordering (e.g., 1 + x + x**2):
>
>         $isympy -o rev-lex
>
>     ORDER must be one of 'lex', 'rev-lex', 'grlex', 'rev-grlex',
>     'grevlex', 'rev-grevlex', 'old', or 'none'.
>
> I believe you can also specify the ordering directly when invoking the
> printing functions, which can be useful if you are not using isympy.
>
> Sergiu

-- 
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 post to this group, send email to sympy@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to