1
0
Fork 0

Ex0.2: Random Numbers with Numpy

This commit is contained in:
Eric Teunis de Boone 2019-11-12 10:39:54 +01:00
parent 45f426d0f5
commit 119c90e36e
2 changed files with 15 additions and 0 deletions

11
ex0.2/gen_rand.py Executable file
View File

@ -0,0 +1,11 @@
#!/usr/bin/env python3
import numpy as np
import sys
N = 1e6
if len(sys.argv) > 1:
N = float(sys.argv[1])
print( np.random.rand( int(N) ) )

4
ex0.2/results.txt Normal file
View File

@ -0,0 +1,4 @@
Running `time ./gen_rand.py "1e9"` gives
real 0m13.803s
user 0m8.874s