title: Find local mimimum in 2D np.array in Python
body: <p>I have this two columns array :</p>
  
  <pre><code>A  | 1 
  A  | 2
  A  | 3
  B  | 4
  B  | 5
  B  | 6
  </code></pre>
  
  <p>where A, B are constants. What I want is to find the mimimum value of each parameter A and B, so the result of this operation would be an other 2D array like this one : </p>
  
  <pre><code>A | 1
  B | 4
  </code></pre>
  
  <p>I succeed in finding the mimium when only one constant A is present : </p>
  
  <pre><code>MIN = np.where(arr == np.amin(arr[:,1]))
  output = arr[MIN[0],:]
  &gt;&gt; output = A | 1
  </code></pre>
  
  <p>But I can't automatize it when the array is more complex than that. Thanks for the help. </p>