The initial condition must be a dual number in order to push forward the derivatives with respect to parameters on the state. But if you differentiate by the parameters, then p
is Dual
while u0
isn’t. So we have a consistency check to upconvert u0
in this case. We missed the specific case though where p
is a scalar (always assumed it was an abstractarray, tuple, or named tuple).