Skip to content

Commit a8e204c

Browse files
test: symbolic indexing adjoint
1 parent f522821 commit a8e204c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/downstream/symbol_indexing.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ sol_new = DiffEqArray(sol.u[1:10],
3434
@test_throws Exception sol[τ]
3535
@test_throws Exception sol_new[τ]
3636

37+
gs, = Zygote.gradient(sol) do sol
38+
sum(sol[fol_separate.x])
39+
end
40+
41+
@test "Symbolic Indexing ADjoint" all(all.(isone, gs.u))
42+
3743
# Tables interface
3844
test_tables_interface(sol_new, [:timestamp, Symbol("x(t)")], hcat(sol_new[t], sol_new[x]))
3945

0 commit comments

Comments
 (0)