We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 018ecee commit ded8a6cCopy full SHA for ded8a6c
symengine/lib/symengine_wrapper.pyx
@@ -4063,7 +4063,16 @@ def module_cleanup():
4063
import atexit
4064
atexit.register(module_cleanup)
4065
4066
+
4067
def diff(expr, *args):
4068
+ if isinstance(expr, MatrixBase):
4069
+ # Don't sympify matrices so that mutable matrices
4070
+ # return mutable matrices
4071
+ return _diff(expr, *args)
4072
+ return _diff(sympify(expr, *args))
4073
4074
4075
+def _diff(expr, *args):
4076
cdef Basic prev
4077
cdef Basic b
4078
cdef size_t i
0 commit comments