From e9d90023ab0a0d888a6ed4fd3fc3274fce725cff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simen=20Hus=C3=B8y?= Date: Thu, 24 Jul 2025 22:01:03 +0200 Subject: [PATCH] Make backsolve_checkpoint_callbacks work with ComponentVectors by switching axes with size --- src/backsolve_adjoint.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backsolve_adjoint.jl b/src/backsolve_adjoint.jl index 39385d964..f27ec64ea 100644 --- a/src/backsolve_adjoint.jl +++ b/src/backsolve_adjoint.jl @@ -461,7 +461,7 @@ function backsolve_checkpoint_callbacks(sensefun, sol, checkpoints, callback, cur_time = Ref(length(_checkpoints)) affect! = let sol = sol, cur_time = cur_time, idx = length(state_values(prob)) function (integrator) - _y = reshape(@view(integrator.u[(end - idx + 1):end]), axes(state_values(prob))) + _y = reshape(@view(integrator.u[(end - idx + 1):end]), size(state_values(prob))) sol(_y, integrator.t) u_modified!(integrator, true) cur_time[] -= 1