import os
import h5py
import numpy as np
path = '/tmp/out.h5'
os.remove(path)
with h5py.File(path, 'a') as f:
    dset = f.create_dataset('voltage284', (10 ** 5,), maxshape=(None,),
        dtype='i8', chunks=(10 ** 4,))
dset[:] = np.random.random(dset.shape)
print(dset.shape)
for i in range(3):
    dset.resize(dset.shape[0] + 10 ** 4, axis=0)
dset[-10 ** 4:] = np.random.random(10 ** 4)
print(dset.shape)
инкрементная запись в hdf5 с помощью h5py