I have now a mid term solution based on all your tips and it has been 
posted in Stackoverflow, in a post created for this issue.
I would really appreciate if you could take a look there and make any 
suggestions you believe would improve the solution.
I am still not managing to perform all the differentiations, but at least 
now it is applied only where it should.


On Monday, March 18, 2013 11:44:26 PM UTC+1, Julien Rioux wrote:
>
> On Monday, 18 March 2013 05:49:11 UTC-4, Saullo Castro wrote:
>>
>> Dear Mr. Zhang, we are using a differential operator as you need, please 
>> see more details on:
>>
>> http://stackoverflow.com/questions/15463412/matrix-of-differential-operators-in-python-module-sympy
>>
>> We could address it without changing the core classes in Sympy only when 
>> the differential operator is used on the left side. When it is used on the 
>> right side the method __mul__ in the core class Expr had to be changed.
>> We are still looking for a Sympy native solution, though.
>>
>> Regards
>>
>>
>>
> _op_priority and the @call_highest_priority are there exactly for this 
> purpose. Define it in your class with a value above 10.0, which is Expr's 
> default value for it. Also define __rmul__, using the decorator 
> @call_highest_priority. This will allow your class to control what happens 
> during multiplication (left or right), but you will still run into subtle 
> problems because multiplication != application, as already a mentioned 
> couple of times.
>
> Cheers,
> Julien
>

-- 
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-US.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to