-
-
Save mytrile/971051827fd54ce6248b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import random | |
data = np.zeros(10000000,'i') | |
idx = [random.randint(0,10000000-1) for x in range(10)] | |
data[idx] = 1 | |
print data.nonzero()[0] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment