I would like to find the local minima and maxima simultanously in an array. I attempted to use Scipy's argrelextrema, but I don't find any documentation on the required comparator function. I attempted to write my own with no success. How could I do this?I would like to find the local minima and maxim