Exemplo n.º 1
0
 def _eval_derivative(self, v):
     from sympy.matrices.expressions.matexpr import _matrix_derivative
     return _matrix_derivative(self, v)
 def _call_derive_default(expr, v):  # type: (Expr, Expr) -> Optional[Expr]
     if expr.has(v):
         return _matrix_derivative(expr, v)
     else:
         return None
 def _call_derive_scalar_by_matexpr(expr,
                                    v):  # type: (Expr, MatrixExpr) -> Expr
     if expr.has(v):
         return _matrix_derivative(expr, v)
     else:
         return ZeroMatrix(*v.shape)
 def _call_derive_matrix_by_scalar(expr,
                                   v):  # type: (MatrixCommon, Expr) -> Expr
     return _matrix_derivative(expr, v)
Exemplo n.º 5
0
Arquivo: trace.py Projeto: cklb/sympy
 def _eval_derivative(self, v):
     from sympy.matrices.expressions.matexpr import _matrix_derivative
     return _matrix_derivative(self, v)