Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import h5py
- f = h5py.File('./data/..../test.h5', 'w')
- x = np.array([[][], [][]])
- dt = h5py.special_dtype(vlen=str)
- d1 = f.create_dataset('d1', shape=x.shape, dtype=dt)
- d1[:] = x
- f['test'].attrs['names'] = ['content', 'label']
- f = h5py.File('x......h5')
- test = f['test'][:]
- names = f['test'].attrs['names']
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement