Skip to content

Commit e8a70e5

Browse files
committed
Add jacobian test
1 parent 58863f3 commit e8a70e5

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

test/StdTest.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,12 +288,13 @@ end
288288
@test to_std_string(gradient(sum((A * x - y) .^ 2), x)) == "2Aᵀ(Ax - y)"
289289
end
290290

291-
@testset "to_std_string of jacobian {A, A'} * x" begin
291+
@testset "to_std_string of jacobian" begin
292292
@matrix A
293-
@vector x
293+
@vector x y
294294

295295
@test to_std_string(jacobian(A * x, x)) == "A"
296296
@test to_std_string(jacobian(A' * x, x)) == "Aᵀ"
297+
@test to_std_string(jacobian(sin(A * x + y), x)) == "diag(cos(Ax + y))A"
297298
end
298299

299300
@testset "to_std_string of derivative {A, A'} * x" begin

0 commit comments

Comments
 (0)