import numpy as np
import tables
x = np.random.random((100, 100, 100))
f = tables.openFile('test.hdf', 'w')
atom = tables.Atom.from_dtype(x.dtype)
ds = f.createCArray(f.root, 'somename', atom, x.shape)
ds[:] = x
f.close()
Python: how to store a numpy multidimensional array in PyTables?