import time
import numpy
import random
n = 30000
m = 1
t = time.time()
for i in range(10 ** m):
list((numpy.random.rand(n) * 10).astype(int))
print("numpy way took %.3f seconds" % (time.time() - t))
t = time.time()
for i in range(10 ** m):
[int(random.random() * 10) for _ in range(n)]
print("randint way took %.3f seconds" % (time.time() - t))
aW1wb3J0IHRpbWUKaW1wb3J0IG51bXB5CmltcG9ydCByYW5kb20KCm4gPSAzMDAwMAptID0gMQoKdCA9IHRpbWUudGltZSgpCmZvciBpIGluIHJhbmdlKDEwICoqIG0pOgoJbGlzdCgobnVtcHkucmFuZG9tLnJhbmQobikgKiAxMCkuYXN0eXBlKGludCkpCnByaW50KCJudW1weSB3YXkgdG9vayAlLjNmIHNlY29uZHMiICUgKHRpbWUudGltZSgpIC0gdCkpCgp0ID0gdGltZS50aW1lKCkKZm9yIGkgaW4gcmFuZ2UoMTAgKiogbSk6CglbaW50KHJhbmRvbS5yYW5kb20oKSAqIDEwKSBmb3IgXyBpbiByYW5nZShuKV0KcHJpbnQoInJhbmRpbnQgd2F5IHRvb2sgJS4zZiBzZWNvbmRzIiAlICh0aW1lLnRpbWUoKSAtIHQpKQo=