One can find the crude integral from a pair of numpy arrays quickly. Numpy provides a function, trapz, to do this using the trapezoid rule, given a pair of x and y arrays. Example:
import numpy as np
x = np.linspace(0., 1., 100)
y = x*x
np.trapz(y, x)
The results is 0.33335033840084344, close to the exact value 1/3. This may be useful for Exercise E4.12.
For more accurate calculation of integrals, consider using quad from the scipy.integrate library.