title: How to remove every other element of an array in python? (The inverse of np.repeat()?)
body: <p>If I have an array x, and do an <code>np.repeat(x,2)</code>, I'm practically duplicating the array.</p>
  
  <pre><code>&gt;&gt;&gt; x = np.array([1,2,3,4])    
  &gt;&gt;&gt; np.repeat(x, 2)
  array([1, 1, 2, 2, 3, 3, 4, 4])
  </code></pre>
  
  <p>How can I do the opposite so that I end up with the original array?</p>
  
  <p>It should also work with a random array y:</p>
  
  <pre><code>&gt;&gt;&gt; y = np.array([1,7,9,2,2,8,5,3,4])  
  </code></pre>
  
  <p>How can I delete every other element so that I end up with the following?</p>
  
  <pre><code>array([7, 2, 8, 3])
  </code></pre>