File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ cimport sage.matrix.matrix as matrix
1313from sage.structure.richcmp cimport richcmp_item, rich_to_bool
1414import sage.matrix.matrix_space
1515import sage.structure.sequence
16+ import sage.calculus.functional
1617
1718
1819cdef class Matrix_dense(matrix.Matrix):
@@ -275,11 +276,17 @@ cdef class Matrix_dense(matrix.Matrix):
275276 sage: m._derivative(x) # needs sage.symbolic
276277 [ 0 1]
277278 [ 2*x 3*x^2]
279+
280+ TESTS:
281+
282+ sage: u = matrix(1, 2, [-1, 1])
283+ sage: derivative(u, x)
284+ [0 0]
278285 """
279286 # We could just use apply_map
280287 if self ._nrows== 0 or self ._ncols== 0 :
281288 return self .__copy__()
282- v = [z. derivative(var) for z in self .list()]
289+ v = [sage.calculus.functional. derivative(z, var) for z in self .list()]
283290 if R is None :
284291 v = sage.structure.sequence.Sequence(v)
285292 R = v.universe()
You can’t perform that action at this time.
0 commit comments