From aa5df35bee4f15db86ca3e7000b5deb748454972 Mon Sep 17 00:00:00 2001 From: Aayush Sabharwal Date: Tue, 3 Dec 2024 16:55:27 +0530 Subject: [PATCH] fix: handle case where `ODEProblem` is trivial --- src/remake.jl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/remake.jl b/src/remake.jl index 5979cda2e..d041793ba 100644 --- a/src/remake.jl +++ b/src/remake.jl @@ -187,6 +187,9 @@ function remake(prob::ODEProblem; f = missing, if !lazy_initialization u0, p, _ = get_initial_values( prob, prob, prob.f, OverrideInit(), Val(isinplace(prob))) + if isempty(u0) + u0 = nothing + end @reset prob.u0 = u0 @reset prob.p = p end