Changing size of ODE system: resize! works but deleteat! doesn't

Well, from the docs, it seems that both should work and handle correctly what is to be handled. Maybe that is a bug

From: Integrator Interface · DifferentialEquations.jl

  • resize!(integrator,k) : Resizes the DE to a size k . This chops off the end of the array, or adds blank values at the end, depending on whether k>length(integrator.u) .
  • resize_non_user_cache!(integrator,k) : Resizes the non-user facing caches to be compatible with a DE of size k . This includes resizing Jacobian caches. Note that in many cases, resize! simple resizes user_cache variables and then calls this function. This finer control is required for some AbstractArray operations.
  • deleteat_non_user_cache!(integrator,idxs) : deleteat! s the non-user facing caches at indices idxs . This includes resizing Jacobian caches. Note that in many cases, deleteat! simple deleteat! s user_cache variables and then calls this function. This finer control is required for some AbstractArray operations.
  • addat_non_user_cache!(integrator,idxs) : addat! s the non-user facing caches at indices idxs . This includes resizing Jacobian caches. Note that in many cases, addat! simple addat! s user_cache variables and then calls this function. This finer control is required for some AbstractArray operations.
  • deleteat!(integrator,idxs) : Shrinks the ODE by deleting the idxs components.
  • addat!(integrator,idxs) : Grows the ODE by adding the idxs components. Must be contiguous indices.