Automatic differentiation of spline functions

Splines are a common fitting tool and there are a number of versions in Julia, but I can’t seem to find any versions which are auto-differentiable (i.e., for use in JuMP, NLopt, ODE’s, Integration, etc.).
[I’m guessing that the issue is that the resulting Arrays are mutating due to the nature of the bases, which Zygote doesn’t like?]
I would appreciate any help or hints, as I hope to make use of this in classes I am due to teach.

DataInterpolations.jl seems fine, and even has special overloads. Can you be more specific about your issue?

Thanks - That was one I didn’t look at but will try.

About the specific issue, it seems here that derivatives are calculated for some of the spline routines (which is helpful) but for instance if I try to register a spline function into JuMP, it requires that autodiff=true (automatic differentiation) but automatic differentiation does not work for any of the numerous Julia spline routines I tried. Other nonlinear optimisation routines I tried fall over with a similar error. This seems to imply that I cannot use spline functions with any of the various optimisation packages I tried. [I could write one that would probably work, but that seems wasteful]
Thanks again for your help.

DataInterpolations.jl is used all of the time in optimization packages. There’s tutorials in SciMLSensitivity.jl which use Optimization.jl with ODEs and splines in them IIRC. I recommend sticking to the standard maintained packages The SciML Open Souce Software Ecosystem · SciML

Great! That sounds like just what I need.

[I’ll mark as ‘solved’ when I get a toy example running]