title: get the index of the last negative value in a 2d array per column
body: <p>I'm trying to get the index of the last negative value of an array per column (in order to slice it after).
  a simple working example on a 1d vector is :</p>
  
  <pre><code>import numpy as np
  
  A = np.arange(10) - 5
  A[2] = 2
  print A # [-5 -4  2 -2 -1  0  1  2  3  4]
  
  idx = np.max(np.where(A &lt;= 0)[0])
  print idx # 5
  
  A[:idx] = 0
  print A # [0 0 0 0 0 0 1 2 3 4]
  </code></pre>
  
  <p>Now I wanna do the same thing on each column of a 2D array :</p>
  
  <pre><code>A = np.arange(10) - 5
  A[2] = 2
  A2 = np.tile(A, 3).reshape((3, 10)) - np.array([0, 2, -1]).reshape((3, 1))
  print A2
  # [[-5 -4  2 -2 -1  0  1  2  3  4]
  #  [-7 -6  0 -4 -3 -2 -1  0  1  2]
  #  [-4 -3  3 -1  0  1  2  3  4  5]]
  </code></pre>
  
  <p>And I would like to obtain :</p>
  
  <pre><code>print A2
  # [[0 0 0 0 0 0 1 2 3 4]
  #  [0 0 0 0 0 0 0 0 1 2]
  #  [0 0 0 0 0 1 2 3 4 5]]
  </code></pre>
  
  <p>but I can't manage to figure out how to translate the max/where statement to the this 2d array...</p>