import tables
import numpy

fileh = tables.openFile("earray1-numpy.h5", mode = "w")
a = tables.IntAtom(shape=(0,2), flavor="numpy")
# Use 'a' as the object type for the enlargeable array
array_c = fileh.createEArray(fileh.root, 'array_c', a, "A test for numpy")
array_c.append(numpy.array([[2, 4]], dtype="int32"))
array_c.append(numpy.array([[6, 8]], dtype="int32"))

# Read the string EArray we have created on disk
print "array_c => %s" % repr(array_c[:])
# Close the file
fileh.close()
