Fri, 23 Nov 2007 17:56:59 +0100, Ivan Vilata i Balaguer wrote: [clip] > Dropping by the very interesting discussion, if 2x2 tensors is the basic > element you want to store (varying with a series of paramenters), and > since it doesn't make much sense for the chunkshape to split a tensor in > the middle, you could have replaced:: > > f.createCArray(f.root, 'huge_array', tables.Float64Atom(), > (2,2,N,N,50,50)) > > by:: > > f.createCArray(..., tables.Float64Atom(shape=(2,2)), (N,N,50,50))
Yep, HDF5/Pytables is quite flexible in the way it allows to store data. What is best probably depends quite a lot what is wanted. > This would have had the side-effect of placing the largest dimensions > first and using a C order. It would be a pity, since the disussion may > not have been spurred! ;) I think we would have had a different discussion ;) >>> import tables >>> N = 600 >>> f = tables.openFile('foo.h5', 'w') >>> f.createCArray(f.root, 'huge_array', tables.Float64Atom(shape=(2,2)), (N,N,50,50)) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/stow/python-easy-install/lib/python2.5/site-packages/ tables-2.0.1-py2.5-linux-i686.egg/tables/file.py", line 793, in createCArray chunkshape=chunkshape, byteorder=byteorder) File "/usr/local/stow/python-easy-install/lib/python2.5/site-packages/ tables-2.0.1-py2.5-linux-i686.egg/tables/carray.py", line 194, in __init__ sorry, but multidimensional atoms are not supported in this context yet.""" NotImplementedError: sorry, but multidimensional atoms are not supported in this context yet. >>> tables.__version__ '2.0.1' -- Pauli Virtanen ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Pytables-users mailing list Pytables-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pytables-users