derivatives of MatrixElements

12 views
Skip to first unread message

Jozef Vesely

unread,
Oct 21, 2016, 3:02:12 PM10/21/16
to sympy
Hello,

I find this behaviour highly nonintuitive (buggy?).
I would like Out[3] and Out[4] to be 1 and 0 respectively.
Am I doing something wrong? Is there a workaround?

Regards

Jozef


In [1]: v=MatrixSymbol("v",5,1)

In [2]: diff(v[0]+v[1],v[0])
Out[2]: 1

In [3]: diff(v[0],v[0])
Out[3]:
 d      
────(v₀₀)
dv₀₀    

In [4]: diff(v[0],v[1])
Out[4]:
 d      
────(v₀₀)
dv₁₀    

In [5]: type(v[0])
Out[5]: sympy.matrices.expressions.matexpr.MatrixElement

Aaron Meurer

unread,
Oct 21, 2016, 3:03:21 PM10/21/16
to sy...@googlegroups.com
This has been fixed in SymPy master.

Aaron Meurer
> --
> 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+un...@googlegroups.com.
> To post to this group, send email to sy...@googlegroups.com.
> Visit this group at https://groups.google.com/group/sympy.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/47f0c3bd-92fa-485e-b07f-d68a16269768%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages