From a91cd20b168cc4d02c28e92da674cc3e746a8da8 Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Sat, 5 Oct 2024 10:39:06 -0400 Subject: [PATCH] fix: zero(Vector(Vector)) doesn't work in 1.10 --- ext/DataInterpolationsChainRulesCoreExt.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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₁]