Cython version of cubic splines, generated up to order 4.