shithub: opus

ref: 31b922e79cbaad7b5143c044ce58b01b4a9be7f8
dir: /training/txt2hdf5.py/

View raw version
#!/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()