Here's what I have so far:
locs = np.where((v_1 >= 1.9) & (v_1 <= 2.00))
I just want to add the condition that the next element (after the one where v_1
meets the current conditions) is larger than the found element.
Thanks in advance!
Here's what I have so far:
locs = np.where((v_1 >= 1.9) & (v_1 <= 2.00))
I just want to add the condition that the next element (after the one where v_1
meets the current conditions) is larger than the found element.
Thanks in advance!
Well, I solved it myself!
(see Finding local maxima/minima with Numpy in a 1D numpy array )
locs = (np.diff(np.sign(np.diff(v_1))) < 0).nonzero()[0] +1