Skip to content

Commit

Permalink
fix: remove linear indexing in adjoint utility function
Browse files Browse the repository at this point in the history
  • Loading branch information
AayushSabharwal committed Jun 13, 2024
1 parent 9478431 commit 63cc3d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/SciMLBaseZygoteExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ function not_obs_grads(VA::ODESolution{T}, sym, not_obss_idx, i, Δ) where {T}
map(enumerate(us)) do (u_idx, u)
if u_idx in i
idx = findfirst(isequal(u_idx), i)
Δ[t_idx][idx]
Δ.u[t_idx][idx]

Check warning on line 146 in ext/SciMLBaseZygoteExt.jl

View check run for this annotation

Codecov / codecov/patch

ext/SciMLBaseZygoteExt.jl#L146

Added line #L146 was not covered by tests
else
zero(T)
end
Expand Down

0 comments on commit 63cc3d6

Please sign in to comment.