>> Thanks for doing this. It is indeed very useful, I always wondered how
>> things like this are done in Mathematica.
>>
>> Any ideas how this could be nicely translated to Python?
>>
>> Ondrej
>
> I thought you were going to tell me that sympy already does this.  I
> believe I saw an example somewhere in the docs about matching
> derivatives, but I couldn't immediately find it again.

We have something, but not exactly like in Mathematica. Here is
sympy's implementation of deriv_degree

http://hg.sympy.org/sympy/file/b4a6e225c34a/sympy/solvers/solvers.py#l377

and here are other examples of matching:

http://hg.sympy.org/sympy/file/b4a6e225c34a/sympy/core/tests/test_match.py#l1

E.g. the thing that you were looking for is starting here:

http://hg.sympy.org/sympy/file/b4a6e225c34a/sympy/core/tests/test_match.py#l153

some other docs are here:

http://docs.sympy.org/tutorial.html#pattern-matching

Ondrej

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to