I guess because mutable matrices aren't subclasses of Expr, they need to implement diff. I don't think there is a specific reason _eval_diff is missing. It probably was never implemented.
Aaron Meurer On Sat, Jan 2, 2016 at 8:41 AM, Francesco Bonazzi <[email protected]> wrote: > 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. -- 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/CAKgW%3D6KfGd876SM9dTCDo1HLnUy2cnAbW_XfVGx5rV-cPHPu0Q%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
