diff options
author | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2018-11-03 02:49:44 -0400 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2018-11-03 02:49:44 -0400 |
commit | 054acff3c142c147e3b5801a13347f04c56f0eb5 (patch) | |
tree | 42291fe758accdfef1e673081c697e13774198ab | |
parent | 3ff7e1ae2d46ca325ee7cbbc14388ec138f4273f (diff) | |
download | opus-054acff3c142c147e3b5801a13347f04c56f0eb5.tar.gz |
missing script
-rwxr-xr-x | training/txt2hdf5.py | 12 |
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() |