I would like to draw many samples of k non-repeating numbers from the set {1,...,N}. That is, each sample is drawn without replacement, but there is no dependence across samples. For now, I am drawing each sample individually inside of a for-loop using np.random.permutation(N)[0:k], but I am interested to know if there is a more "numpy-esque" way which avoids the use of a for-loop, in analogy to np.random.rand(M) vs. for i in range(M): np.random.rand()
To be precise, is there a numpy function which will return a Mxk matrix, each row of which is a sample of k points without replacement from {1,...N}, and where M is arbitrary? Or is there a completely different approach which will accomplish the same thing?