title: Removing items in one 2d numpy array from another
body: <p>I have a function, <code>foo</code>, which returns an np array containing every possible combination of <code>np.arange(n)</code> when <code>k</code> numbers are removed.</p>
  <pre><code>import numpy as np
  from itertools import combinations 
  
  def foo(n,k):
      return np.array([np.delete(np.arange(n),i) for i in combinations(range(n),k)])
  </code></pre>
  <p>The output of this function is correct, but the list comprehension it uses means a longer processing time when larger numbers are involved. Is there a more efficient solution to this using pure numpy?</p>
  <p>I have tried using <code>np.delete</code> with <code>idx</code> as the key (a 2d array that contains the values to remove on each row), along with a broadcasted <code>np.arange</code> without success:</p>
  <pre><code>import numpy as np
  from itertools import combinations
  
  k = 2
  n = 15
  
  idx = np.array([i for i in combinations(range(n),k)])
  arr = np.broadcast_to(np.arange(n), (idx.shape[0],n))
  
  res = np.delete(arr, idx, axis=1)
  </code></pre>
  <p>This code produces an empty array.</p>