Lets assume we have a dataset which might be given approximately by import numpy as np x = np.linspace(0,2*np