title: Numpy array: group by one column, sum another
body: <p>I have an array that looks like this:</p>
  
  <pre><code> array([[ 0,  1,  2],
          [ 1,  1,  6],
          [ 2,  2, 10],
          [ 3,  2, 14]])
  </code></pre>
  
  <p>I want to sum the values of the third column that have the same value in the second column, so the result is something is:</p>
  
  <pre><code> array([[ 0,  1,  8],
          [ 1,  2, 24]])
  </code></pre>
  
  <p>I started coding this but I'm stuck with this sum:</p>
  
  <pre><code>import numpy as np
  import sys
  
  inFile = sys.argv[1]
  
  with open(inFile, 'r') as t:
      f = np.genfromtxt(t, delimiter=None, names =["1","2","3"])
  
  f.sort(order=["1","2"])
  if value == previous.value:
     sum(f["3"])
  </code></pre>