diff --git a/ext/DataInterpolationsChainRulesCoreExt.jl b/ext/DataInterpolationsChainRulesCoreExt.jl index a811784d..c7c4da8f 100644 --- a/ext/DataInterpolationsChainRulesCoreExt.jl +++ b/ext/DataInterpolationsChainRulesCoreExt.jl @@ -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 @@ -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₁]