Skip to content

Commit

Permalink
Merge pull request #346 from SciML/myb/frule
Browse files Browse the repository at this point in the history
Intercept frule at the top level
  • Loading branch information
ChrisRackauckas authored Oct 16, 2024
2 parents a084b2c + 4f68b0a commit f5e6ce7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ext/DataInterpolationsChainRulesCoreExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,8 @@ function ChainRulesCore.frule((_, _, Δt), ::typeof(_interpolate), A::AbstractIn
return _interpolate(A, t), derivative(A, t) * Δt
end

function ChainRulesCore.frule((_, Δt), A::AbstractInterpolation, t::Number)
return A(t), derivative(A, t) * Δt
end

end # module

0 comments on commit f5e6ce7

Please sign in to comment.