Welcome to mirror list, hosted at ThFree Co, Russian Federation.

txt2hdf5.py « training - github.com/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9c602877ec8811fb6a489782985b5f1b09860deb (plain)
1
2
3
4
5
6
7
8
9
10
11
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()