How can I put a numpy multidimensional array in a HDF5 file using PyTables?
From what I can tell I can’t put an array field in a pytables table.
I also need to store some info about this array and be able to do mathematical computations on it.
Any suggestions?
There may be a simpler way, but this is how you’d go about doing it, as far as I know:
If you want to specify the compression to use, have a look at
tables.Filters. E.g.There’s probably a simpler way for a lot of this… I haven’t used
pytablesfor anything other than table-like data in a long while.Note: with pytables 3.0,
f.createCArraywas renamed tof.create_carray. It can also accept the array directly, without specifying theatom,