How to construct a cubic spline with C0 continuity
The more complicated your make your polynomial (e.g. 3rd order), the more constraints you need on your boundary conditions (e.g. C2). If you try to fit data to a cubic spline with only C0 conditions, then the problem is under-determined. You might as well fit with a line in that case. Use piecewise linear fit.
Normally when you construct a cubic spline with SciPy you get a spline with C2 continuity, which means the spline's derivative is continuous, and the derivative's derivative is continuous as well.
I would like to create a cubic spline without those guarantees -- in other words, the spline would be a C0 function.
The motivation is to efficiently represent a continuous function on an embedded device.  A smooth derivative is not needed, and in fact just causes the spline to have more error (as compared to the original function) than it would otherwise have.
I know I could write the code to choose the cubic polynomial coefficients on my own, but wondering if there's a simple way to do it with existing code.
Between knots I'd be minimising mean squared error between the function and the fitted cubic.