A Tuesday 02 February 2010 14:12:59 Jon Olav Vik escrigué:
> 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?

I think so, yes.  What about inheriting from `Table` and overloading the 
`__getitem__` and `__setitem__` methods (or any other that you may be 
interested with)?

-- 
Francesc Alted

------------------------------------------------------------------------------
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

Reply via email to