title: Compiling certain columns into a new array
body: <p>Let's say I have a 2D numpy array 'x' and I want to create a new array 'y' with only certain columns from x.</p>
  
  <p>Is there an easy solution for this?</p>
  
  <p>I was trying to write a function that iterates through each column of an array, and then appends every 3rd column to a new array.</p>
  
  <pre class="lang-py prettyprint-override"><code>def grab_features(x, starting = 0, every = 3, rowlength = 16):
      import numpy as np
      import pandas as pd
      y = np.empty([rowlength,1])
      for i in range(starting, np.size(x, 1), every):
          y = np.append(y, np.reshape(x[:, i], (rowlength, 1)), axis=0)
  
      return y
  </code></pre>
  
  <p>I didn't get any errors, but instead the function returned a long 1 dimensional array of float numbers. I was hoping for an array of the same type as x, just with 1/3 of the columns.</p>