That's really cool work. It would be great to see these sorts of things integrated back into SymPy. I'm not sure any of the other major CASs have anything like this. Definitely check out the MatrixExpr classes in the development branch. This work is new and could really use your contribution.
I suspect that you could easily accomplish this if you put the rules you state in your MATRIX_DIFF_RULES dict into a new _eval_derivative method in each of the relevant MatrixExper classes (MatAdd, MatMul, Transpose, Inverse) as Aaron suggests. Do we have a class to represent (∂X)? I'm happy to help if you have questions about MatrixExprs. On Sun, Apr 15, 2012 at 2:59 PM, Aaron Meurer <[email protected]> wrote: > Hi. > > We do plan to do this. See > http://code.google.com/p/sympy/issues/detail?id=2759. No present work > is being done on it now, though. > > We have MatrixSymbol objects, which already implement all the > boilerplate stuff like transposes (it's been implemented since the > last release, so you'll have to use the git master to use it). All > that needs to be done is to properly implement the ._eval_derivative > methods. > > If you can help start implementing these rules, that would be great. > Let us know if you need any help with the git workflow. We have an > extensive guide at > https://github.com/sympy/sympy/wiki/development-workflow. > > Aaron Meurer > > On Sun, Apr 15, 2012 at 11:16 AM, Valentin Z > <[email protected]> wrote: > > Hi everyone, > > > > I have seen an ancient thread on this forum about automatic symbolic > > matrix differentiation, to have sympy compute expressions like: > > > > ∂(XY) = (∂X)Y + X(∂Y) > > d( A' ) = d ( A ) ' (transpose) > > etc... > > > > Are there still projects in this direction ? What has been decided > > about a symbolic matrix class (where one matrix = one letter ) ? > > > > I just implemented my own matrix differentiator method but it is > > something built kind of "beside" the rest of sympy (with its own > > printing and latex methods). However it could be easily added to the > > package: > > > > > http://zulko.wordpress.com/2012/04/15/symbolic-matrix-differentiation-with-sympy/ > > > > Hope it helps until an 'official' solution comes to light :) > > > > Cheers, > > > > Valentin > > > > -- > > You received this message because you are subscribed to the Google > Groups "sympy" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > [email protected]. > > For more options, visit this group at > http://groups.google.com/group/sympy?hl=en. > > > > -- > You received this message because you are subscribed to the Google Groups > "sympy" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/sympy?hl=en. > > -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
