Created
October 22, 2019 09:43
-
-
Save voldern/9fce3a83839c00e71242a5f0d1343f3a 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 h5py | |
ADDRESS_COUNT = 100_000 | |
BATCH_COUNT = 500 | |
matrix = np.random.rand(ADDRESS_COUNT // BATCH_COUNT, ADDRESS_COUNT) | |
for i in range(BATCH_COUNT - 1): | |
print(f'Generating matrix {i} of {BATCH_COUNT}') | |
random_matrix = np.random.rand(ADDRESS_COUNT // BATCH_COUNT, ADDRESS_COUNT) | |
matrix = np.concatenate((matrix, random_matrix)) | |
with h5py.File('random.hdf5', 'w') as f: | |
f.create_dataset('test', data=matrix) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment