I'm using sympy matrix expressions for differentiation and I want to add some custom matrix functions and including spectral norm and eigenvectors. I also want to be able to differentiate expressions containing these functions.
The relevant documentation( https://docs.sympy.org/latest/guides/custom-functions.html) says "functions that accept or return other kinds of objects than complex numbers should subclass another class, such as Boolean, MatrixExpr, Expr, or Basic." but only gives examples for Function. Later it says "Subclasses of Expr that aren’t Function subclasses will need to define _eval_derivative()" I have three questions relating to this 1. When I subclass MatrixExpr what does _eval_derivative need to do? 2. Do I need to define/hook/set/etc. anything else 3. Does anyone have an example I could read? -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/sympy/f84f064c-9f20-47e8-8546-f5be12f87936n%40googlegroups.com.