Reputation: 5444
I want to calculate 5000 random integers between a range 0-50000 for example. I do so using the following code in python:
np.random.seed(0)
ind = np.random.randint(TOTAL_SIZE, size=(5000,)) //TOTAL_SIZE = 50.000
How can I store the rest integers. I tried something like ~ind but did not work.
Upvotes: 1
Views: 102
Reputation: 48337
You can use a list comprehension.
rest = np.array([i for i in range(0,50000) if i not in ind])
Upvotes: 1