Skip to content

Commit

Permalink
Merge pull request #341 from SciML/avik-pal-patch-1
Browse files Browse the repository at this point in the history
fix: zero(Vector(Vector)) doesn't work in 1.10
  • Loading branch information
ChrisRackauckas authored Oct 5, 2024
2 parents 2285070 + a91cd20 commit f667c37
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ext/DataInterpolationsChainRulesCoreExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function ChainRulesCore.rrule(
end

function u_tangent(A::LinearInterpolation, t, Δ)
out = zero(A.u)
out = zero.(A.u)
idx = get_idx(A, t, A.iguesser)
t_factor = (t - A.t[idx]) / (A.t[idx + 1] - A.t[idx])
if eltype(out) <: Number
Expand All @@ -75,7 +75,7 @@ function u_tangent(A::LinearInterpolation, t, Δ)
end

function u_tangent(A::QuadraticInterpolation, t, Δ)
out = zero(A.u)
out = zero.(A.u)
i₀, i₁, i₂ = _quad_interp_indices(A, t, A.iguesser)
t₀ = A.t[i₀]
t₁ = A.t[i₁]
Expand Down

0 comments on commit f667c37

Please sign in to comment.