title: Deleting multiple slices from a numpy array
body: <p>I have a given numpy array and a list containing a number of slice objects (alternatively containing <code>(start, end)</code> tuples). I am looking to remove the slice object positions from the original array and get a second array with the remaining values.</p>
  
  <p>Toy example:</p>
  
  <pre><code>myarray = np.arange(20)
  
  array([ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16,
         17, 18, 19])
  
  mylist=(slice(2,4),slice(15,19))
  </code></pre>
  
  <p>Do something and result should be</p>
  
  <pre><code>array([0, 1, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14])
  </code></pre>
  
  <p>The array can be in a few hundred thousand large, the list of slice objects can contain a few thousand elements and I need to run the operation often, so speed is somewhat important.</p>
  
  <p>Numpy delete does not take a list of slices as far I can see?</p>
  
  <p>For now I am generating the complement of my slice object list and slicing that, but generating the complement is a somewhat awkward process where I am sorting my slice list then iterating through it, creating the complement slice objects as needed. I am hoping there is a more elegant way I have not figured! </p>