From cddc808bddbacac16a79ae20b98dd36e3eed16a7 Mon Sep 17 00:00:00 2001 From: thorek1 Date: Sun, 27 Oct 2024 15:36:16 +0100 Subject: [PATCH] fix first order sol pullback --- src/perturbation.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/perturbation.jl b/src/perturbation.jl index b7a8f50a..78e0f8bc 100644 --- a/src/perturbation.jl +++ b/src/perturbation.jl @@ -171,7 +171,7 @@ function rrule(::typeof(calculate_first_order_solution), verbose = verbose) if !solved - return zeros(T.nVars,T.nPast_not_future_and_mixed + T.nExo), sol, false, x -> NoTangent(), NoTangent(), NoTangent() + return (zeros(T.nVars,T.nPast_not_future_and_mixed + T.nExo), sol, false), x -> NoTangent(), NoTangent(), NoTangent() end end # timeit_debug @@ -195,7 +195,7 @@ function rrule(::typeof(calculate_first_order_solution), Ā̂₀ᵤ = ℒ.lu!(Ā₀ᵤ, check = false) if !ℒ.issuccess(Ā̂₀ᵤ) - return zeros(T.nVars,T.nPast_not_future_and_mixed + T.nExo), sol, false, x -> NoTangent(), NoTangent(), NoTangent() + return (zeros(T.nVars,T.nPast_not_future_and_mixed + T.nExo), sol, false), x -> NoTangent(), NoTangent(), NoTangent() end # A = vcat(-(Ā̂₀ᵤ \ (A₊ᵤ * D * L + Ã₀ᵤ * sol[T.dynamic_order,:] + A₋ᵤ)), sol)