title: Selecting a subset of an astropy table
body: <p>I am trying to create a subset of an astropy table.</p>
  
  <p>I am told I need to use numpy but when I access the table via numpy I don't seem to get a 2d numpy table and am confused.</p>
  
  <p>The table I am trying to create a subset comes from the GAMA Survey</p>
  
  <p>I have tried</p>
  
  <pre><code>import numpy as np
  from astropy.table import Table
  t = Table.read('GAMA_Data/InputCatA.fits')
  ta = np.array(t)
  </code></pre>
  
  <p>I wish to perform a number of subsets like</p>
  
  <pre><code>t['PETROMAG_I'] &gt; 17.5)
  </code></pre>
  
  <p>I received some advice that I need to use numpy.
  I can determine that 'PETROMG_I' is column 16 with</p>
  
  <pre><code>print(t.colnames.index('PETROMAG_I'))
  </code></pre>
  
  <p>But do not see how to do a subset on either the table or numpy array</p>
  
  <pre><code> print('Source Table : '+str(len(ta)))
   print('Shape : '+str(ta.shape))
   print(ta)
  </code></pre>
  
  <p>Gives </p>
  
  <pre><code>Source Table : 960510
  Shape : (960510,)
  [(     0, 588848900971299297, 145.46972201, 0.65141891,           68987912448,        0, 3.0191224, 20.57372 , 20.748629, 4503874773745664, 0.3678997 , 2.9388053, 1.2919843 , 28.094984, 21.347776, 19.99194 , 19.40016 , 18.74607 , 22.722446, 21.583874, 19.939884, 19.270464, 18.782948,  9843, 756)
   (     1, 588848900971299302, 145.47892146, 0.63515137,       68987912448,        0, 3.3755734, 21.073107, 21.055092, 4503874773745664, 0.37012857, 3.619758 , 1.5749472 , 21.076248, 20.432001, 20.08754 , 19.929377, 20.802927, 21.622843, 20.553198, 20.045462, 19.874853, 19.653866,  9843, 756)
  </code></pre>