title: Delete rows at select indexes from a numpy array
body: <p>In my dataset I've close to 200 rows but for a minimal working e.g., let's assume the following array:</p>
  
  <pre><code>arr = np.array([[1,2,3,4], [5,6,7,8], 
                 [9,10,11,12], [13,14,15,16], 
                 [17,18,19,20], [21,22,23,24]])
  </code></pre>
  
  <p>I can take a random sampling of 3 of the rows as follows:</p>
  
  <pre><code>indexes = np.random.choice(np.arange(arr.shape[0]), int(arr.shape[0]/2), replace=False)
  </code></pre>
  
  <p>Using these indexes, I can select my test cases as follows:</p>
  
  <pre><code>testing = arr[indexes]
  </code></pre>
  
  <p>I want to delete the rows at these indexes and I can use the remaining elements for my training set.</p>
  
  <p>From the post <a href="https://stackoverflow.com/questions/15749123/pythonic-way-to-delete-elements-from-a-numpy-array">here</a>, it seems that <code>training = np.delete(arr, indexes)</code> ought to do it. But I get 1d array instead. </p>
  
  <p>I also tried the suggestion <a href="https://stackoverflow.com/questions/16222621/get-a-subarray-from-a-numpy-array-based-on-index">here</a> using <code>training = arr[indexes.astype(np.bool)]</code> but it did not give a clean separation. I get element [5,6,7,8] in both the training and testing sets.</p>
  
  <pre><code>training = arr[indexes.astype(np.bool)]
  
  testing
  Out[101]: 
  array([[13, 14, 15, 16],
         [ 5,  6,  7,  8],
         [17, 18, 19, 20]])
  
  training
  Out[102]: 
  array([[ 1,  2,  3,  4],
         [ 5,  6,  7,  8],
         [ 9, 10, 11, 12]])
  </code></pre>
  
  <p>Any idea what I am doing wrong? Thanks.</p>