From 02323bbbad31824f3db7b34840ba498316aac6ec Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Sun, 20 Oct 2024 17:45:00 -0400 Subject: [PATCH] fix(SimpleNonlinearSolve): incorrect argument ordering --- lib/SimpleNonlinearSolve/src/utils.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/SimpleNonlinearSolve/src/utils.jl b/lib/SimpleNonlinearSolve/src/utils.jl index 9a1c36508..311762429 100644 --- a/lib/SimpleNonlinearSolve/src/utils.jl +++ b/lib/SimpleNonlinearSolve/src/utils.jl @@ -139,7 +139,7 @@ function prepare_jacobian(prob, autodiff, fx, x) return DIExtras(DI.prepare_jacobian(prob.f, fx, autodiff, x, Constant(prob.p))) else x isa SArray && return DINoPreparation() - return DI.prepare_jacobian(prob.f, autodiff, x, Constant(prob.p)) + return DIExtras(DI.prepare_jacobian(prob.f, autodiff, x, Constant(prob.p))) end end @@ -186,7 +186,7 @@ function compute_jacobian!!(J, prob, autodiff, fx, x, extras::DIExtras) end end if SciMLBase.isinplace(prob.f) - DI.jacobian!(prob.f, J, fx, extras.prep, autodiff, x, Constant(prob.p)) + DI.jacobian!(prob.f, fx, J, extras.prep, autodiff, x, Constant(prob.p)) else if ArrayInterface.can_setindex(J) DI.jacobian!(prob.f, J, extras.prep, autodiff, x, Constant(prob.p))