title: Find index where elements change value numpy
body: <p>Suppose I have </p>
  
  <pre><code>&gt;&gt;&gt; v
  array([1, 1, 1, 1, 1, 2, 2, 2, 3, 4, 3, 4, 3, 4, 3, 4, 5, 5, 5])
  </code></pre>
  
  <p>Is there an efficient numpy way to find each index where the value changes? For instance, I would want some result like,</p>
  
  <pre><code>&gt;&gt;&gt; index_of_changed_values(v)
  [0, 5, 8, 9, 10, 11, 12, 13, 14, 15, 16]
  </code></pre>
  
  <p>If this is not possible with some numpy routine, what is a fast way to do it in python? It would also be useful to me to be referred to some good numpy tutorials since I am a numpy beginner.</p>