Skip to content

Commit dfba2d2

Browse files
committed
Add gradient test
1 parent c0eeee3 commit dfba2d2

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

test/StdTest.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@ end
285285
@test to_std_string(gradient(sum(x .^ 3), x)) == "3x²"
286286
@test to_std_string(gradient(sum((x + y) .^ 2), x)) == "2(x + y)"
287287
@test to_std_string(gradient(sum((x .* y) .^ 2), x)) == "2(x ⊙ y ⊙ y)"
288+
@test to_std_string(gradient(sum((A * x - y) .^ 2), x)) == "2Aᵀ(Ax - y)"
288289
end
289290

290291
@testset "to_std_string of jacobian {A, A'} * x" begin

0 commit comments

Comments
 (0)