[Numpy-discussion] Remove a random sample from array

Florian Lindner mailinglists at xgm.de
Mon May 16 10:08:07 EDT 2016


Hello,

I have an array of shape (n, 2) from which I want to extract a random sample 
of 20% of rows. The choosen samples should be removed the original array and 
moved to a new array of the same shape (n, 2).

What is the most clever way to do with numpy?

Thanks,
Florian



More information about the NumPy-Discussion mailing list