In this chapter, we have explored two basic problems in the field of approximation theory: interpolation and approximation in the sense of least squares. We learned that there are three different modes to approach solutions to these problems in SciPy:

A procedural mode, that offers quick numerical solutions in the form of

`ndarrays`

.A functional mode that offers

`numpy`

functions as the output.An object-oriented mode, with great flexibility through different classes and their methods. We use this mode when we require from our solutions extra information (such as information about roots, coefficients, knots, and errors), or related objects (such as the representation of derivatives or antiderivatives).

We explored in detail all the different implementations for the interpolation coded in the `scipy.interpolate`

module, and learned in particular that those related to splines are wrappers of several routines in the Fortran library `FITPACK`

.

In the case of linear approximations in the least squares...