Francesc Alted <faltet <at> pytables.org> writes: > A Monday 01 February 2010 15:15:45 Jon Olav Vik escrigué: > > I'd like suggestions on how to work around > > NotImplementedError: record arrays with columns with type description > > ``([('a', ' > > <f8'), ('b', '<f8')],(3,))`` are not supported yet, sorry [...] > > What is the best workaround for this, given that I have a lot of existing > > code based on the assumption that each record has a field called y that > > contains a vector whose items have fields ("a", "b")? > > Yes, multidimensional tables are not supported yet (although multidimensional > columns are). I plan to implement column-wise tables in the near future, and > I think that multidimensional tables would fit well within these new beasts.
[...] > > Another is to go from a record that has a field that > > ...contains a vector whose items have fields ("a", "b") > > to > > ...has fields ("a", "b") whose items are vectors > > > > This can be stored in PyTables. However, the data in each record will be > > transposed (all time-points for each field will be contiguous). > > Well, I think this is your best bet with PyTables for the moment. If this is > not enough for you, you may want to try h5py that, if I recall correctly, has > support for multidimensional tables. I don't require fully multidimensional tables, e.g. I don't need a "cols" method within each field. However, it would be nice to get back each entire record with the same dtype as I put it in. For now, I guess I'll just store each record as x[i].view(np.int8), keep list(str(x.dtype)) as an attribute of the table, and accept the hassle of doing f.root.x[i].view (f.root.x.attrs.dtype) or something. Is there a clean way to do that automatically, e.g. by overriding some method of the Table object? ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com _______________________________________________ Pytables-users mailing list Pytables-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pytables-users