Skip to content

Commit

Permalink
Update src/solutions/chainrules.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas authored Aug 11, 2023
1 parent 32890b2 commit 24d748d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/solutions/chainrules.jl
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function ChainRulesCore.rrule(::typeof(getindex), VA::ODESolution, sym)
function ODESolution_getindex_pullback(Δ)
i = issymbollike(sym) ? sym_to_index(sym, VA) : sym
if i === nothing
throw("AD of purely-symbolic slicing for observed quantities is not yet supported. Work around this by using `A[sym,i]` to access each element sequentially in the function being differentiated.")
throw(error("AD of purely-symbolic slicing for observed quantities is not yet supported. Work around this by using `A[sym,i]` to access each element sequentially in the function being differentiated."))

Check warning on line 64 in src/solutions/chainrules.jl

View check run for this annotation

Codecov / codecov/patch

src/solutions/chainrules.jl#L60-L64

Added lines #L60 - L64 were not covered by tests
else
Δ′ = [[i == k ? Δ[j] : zero(x[1]) for k in 1:length(x)]

Check warning on line 66 in src/solutions/chainrules.jl

View check run for this annotation

Codecov / codecov/patch

src/solutions/chainrules.jl#L66

Added line #L66 was not covered by tests
for (x, j) in zip(VA.u, 1:length(VA))]
Expand Down

0 comments on commit 24d748d

Please sign in to comment.