summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Marc Valin <jmvalin@jmvalin.ca>2018-11-03 02:49:44 -0400
committerJean-Marc Valin <jmvalin@jmvalin.ca>2018-11-03 02:49:44 -0400
commit054acff3c142c147e3b5801a13347f04c56f0eb5 (patch)
tree42291fe758accdfef1e673081c697e13774198ab
parent3ff7e1ae2d46ca325ee7cbbc14388ec138f4273f (diff)
downloadopus-054acff3c142c147e3b5801a13347f04c56f0eb5.tar.gz
missing script
-rwxr-xr-xtraining/txt2hdf5.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/training/txt2hdf5.py b/training/txt2hdf5.py
new file mode 100755
index 00000000..9c602877
--- /dev/null
+++ b/training/txt2hdf5.py
@@ -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()