title: Deleting row in numpy array based on condition
body: <p>I have a 2D numpy array of shape [6,2] and I want to remove the subarrays with the third element containing 0.</p>
  
  <pre><code>array([[0, 2, 1], #Input
         [0, 1, 1],
         [1, 1, 0],
         [1, 0, 2],
         [0, 2, 0],
         [2, 1, 2]])
  
  array([[0, 2, 1], #Output
         [0, 1, 1],
         [1, 0, 2],
         [2, 1, 2]]) 
  </code></pre>
  
  <p>My code is <code>positives = gt_boxes[np.where(gt_boxes[range(gt_boxes.shape[0]),2] != 0)]</code></p>
  
  <p>It works but is there a simplified method to this?</p>