Is there a reason why matrices don't implement *_eval_diff*?
Elementwise derivatives are currently handled by the *diff* method.
Calling *matrix.diff(x)* calculates derivatives elementwisely, *diff(matrix,
x)* returns an unevaluated derivative.
In [12]: var('x y z')
Out[12]: (x, y, z)
In [13]: m = Matrix([[x, y], [x*y, x*z]])
In [14]: m.diff(x)
Out[14]:
Matrix([
[1, 0],
[y, z]])
In [15]: diff(m, x)
Out[15]:
Derivative(Matrix([
[ x, y],
[x*y, x*z]]), x)
--
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 [email protected].
To post to this group, send email to [email protected].
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/7227d34c-ab83-4325-9ff7-10b097a7b053%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.