I have some data in Numpy in the form of a sine wave and I want to find the local maxima and minima of the function. I managed to create a loop to find the maxima and I coul