How to efficiently get 10% of random numbers, then 10% of remaining 90 etc untill all points allocated
问题 This is what I want to do : I have 300 000 points. I want 10% of the points. I then want 10% of the remaining 90% of points. I then want 10% of the remaining 81% of points I then want 10% of the remaining 73% of points etc until i'm finished with all the points. Is this the fastest way of doing it: #all the points s = np.arange(len(c_list)) np.random.shuffle(s) #first 10% s1 = np.arange(len(c_list)*10/100) np.random.shuffle(s1) k = s1 while len(k)<len(s) : r = [x for x in s if x not in k]#get