Skip to content

Instantly share code, notes, and snippets.

@hankliu5
Created April 2, 2018 02:22
Show Gist options
  • Save hankliu5/ed6b94a923459d9a6b2cf7480277d5dd to your computer and use it in GitHub Desktop.
Save hankliu5/ed6b94a923459d9a6b2cf7480277d5dd to your computer and use it in GitHub Desktop.
import numpy as np
import sys
np.random.seed(0)
size = int(sys.argv[1]) if len(sys.argv) > 1 else 4096
outfile = open('ascii_floats_{}.txt'.format(size), 'w')
A = np.random.random((size, size))
np.savetxt(outfile, A)
np.save('validation_floats_{}'.format(size), A)
outfile.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment