missing script master
authorJean-Marc Valin <jmvalin@jmvalin.ca>
Sat, 3 Nov 2018 06:49:44 +0000 (02:49 -0400)
committerJean-Marc Valin <jmvalin@jmvalin.ca>
Sat, 3 Nov 2018 06:49:44 +0000 (02:49 -0400)
training/txt2hdf5.py [new file with mode: 0755]

diff --git a/training/txt2hdf5.py b/training/txt2hdf5.py
new file mode 100755 (executable)
index 0000000..9c60287
--- /dev/null
@@ -0,0 +1,12 @@
+#!/usr/bin/python
+
+from __future__ import print_function
+
+import numpy as np
+import h5py
+import sys
+
+data = np.loadtxt(sys.argv[1], dtype='float32')
+h5f = h5py.File(sys.argv[2], 'w');
+h5f.create_dataset('data', data=data)
+h5f.close()