Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

8 June 2026

HDF5

official hdf5py docs

import h5py
f = h5py.File('mytestfile.hdf5', 'r')
print(list(f.keys()))
print(dset.shape)
print(dset.dshape)

Writing

dset = f.create_dataset("mydataset", (100,), dtype='i')
print(dset.shape)  # (100,)