Try looking at the diff
function in numpy
. That will give you the difference between each value and its right neighbor. You can then check if that value is smaller or larger than 0.
0
solved Python check if one value is greater than the next one in array/vector [duplicate]