2023-10-31 13:48:54 +00:00
|
|
|
import numpy as np
|
|
|
|
import os
|
|
|
|
|
|
|
|
randomizer = np.random.default_rng(42)
|
|
|
|
randvec = randomizer.integers(low=0, high=pow(2, 32), size=pow(10, 7))
|
|
|
|
|
|
|
|
print("Generated random vector with {} entries".format(randvec.size))
|
|
|
|
|
|
|
|
with open("dataset.dat", "w") as file:
|
|
|
|
for value in randvec:
|
2023-11-01 09:00:36 +00:00
|
|
|
file.write(str(value) + '\n')
|
2023-10-31 13:48:54 +00:00
|
|
|
|
|
|
|
fsize = os.path.getsize("dataset.dat")
|
|
|
|
print("File written down with Size {} MB".format(fsize/1000/1000))
|