예제 #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)
예제 #5
0
파일: trace.py 프로젝트: cklb/sympy
 def _eval_derivative(self, v):
     from sympy.matrices.expressions.matexpr import _matrix_derivative
     return _matrix_derivative(self, v)