title: Finding local maxima of xy data point graph with numpy?
body: <p>I would like to get <em>most efficient</em> way to find local maxima in <em>huge</em> data point sets containing thousands of values. As input are used two long lists with x and y values.</p>
  
  <p>Consider this simple example:</p>
  
  <pre><code>xval = [-0.15, -0.02, 0.1, 0.22, 0.36, 0.43, 0.58, 0.67, 0.79, 0.86, 0.96 ]
  
  yval = [-0.09, 0.13, -0.01, -0.1, -0.05, 0.2, 0.56, 0.47, 0.35, 0.43, 0.69]
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/vj2Vk.png" alt="enter image description here"></p>
  
  <p>Desired output is list with indexes of peak points, here locMaxId =[1,6,10].
  Comparing the closest neighbours is solution, but for 10k values?</p>