title: 2D equivalent of numpy.unique
body: <p>I have a set of discretized coordinates in a Nx2 <code>numpy.ndarray</code>.</p>
  
  <p>I would like to get the counts and indices of each of these unique coordinate sets. <a href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.unique.html" rel="nofollow"><code>numpy.unique</code></a> does exactly this, but for scalar elements. </p>
  
  <p>Is there some clean way to do this using <code>numpy</code>?</p>
  
  <p>Example:</p>
  
  <pre><code>#input
  coor = np.array([[10,10],[12,9],[10,5],[12,9]]) 
  #output
  unique_count = np.array([1,2,1])
  unique_index = np.array([0,1,2]) #1 could also be 3
  </code></pre>
  
  <p>EDIT:
  <code>unique count</code>, would give the counts of each of the unique values, ie: 1 of <code>[10,10]</code>, 2 of <code>[12,9]</code> and 1 of <code>[10,5]</code>. One would then find the values these correspond to with <code>coor[unique_index]</code></p>