diff options
author | Alex Auvolat <alex.auvolat@ens.fr> | 2015-06-21 15:45:37 -0400 |
---|---|---|
committer | Alex Auvolat <alex.auvolat@ens.fr> | 2015-06-21 15:45:47 -0400 |
commit | 01f27c350347607b31c68cf96ae9c781f10582db (patch) | |
tree | 75e760d981cac15dc094814fa601615a36b640bc /data | |
parent | 294afc20266372ab8d9051ae5a42912be739d01a (diff) | |
download | taxi-01f27c350347607b31c68cf96ae9c781f10582db.tar.gz taxi-01f27c350347607b31c68cf96ae9c781f10582db.zip |
Fix hdf5 generation
Diffstat (limited to 'data')
-rwxr-xr-x | data/init_valid.py | 4 | ||||
-rwxr-xr-x | data/make_valid_cut.py | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/data/init_valid.py b/data/init_valid.py index cecaca9..6694caa 100755 --- a/data/init_valid.py +++ b/data/init_valid.py @@ -38,15 +38,17 @@ def init_valid(path): ('source', 'a', 21), ('start', numpy.int64, 1), ('stop', numpy.int64, 1), + ('indices', h5py.special_dtype(ref=h5py.Reference)), ('available', numpy.bool, 1), ('comment', 'a', 1)])) split_array[:]['split'] = 'dummy'.encode('utf8') for (i, k) in enumerate(_fields.keys()): - split_array[i] = k.encode('utf8') + split_array[i]['source'] = k.encode('utf8') split_array[:]['start'] = 0 split_array[:]['stop'] = 0 split_array[:]['available'] = False + split_array[:]['indices'] = None split_array[:]['comment'] = '.'.encode('utf8') h5file.attrs['split'] = split_array diff --git a/data/make_valid_cut.py b/data/make_valid_cut.py index d5be083..cb23329 100755 --- a/data/make_valid_cut.py +++ b/data/make_valid_cut.py @@ -57,6 +57,7 @@ def make_valid(cutfile, outpath): splits[slen+i]['source'] = field.encode('utf8') splits[slen+i]['start'] = clen splits[slen+i]['stop'] = alen + splits[slen+i]['indices'] = None splits[slen+i]['available'] = True splits[slen+i]['comment'] = '.' file.attrs['split'] = splits |