A Wednesday 16 March 2011 14:28:58 Michael Rissi escrigué:
> Thanks a lot for your very quick answer, that helped a lot and solved
> the problem!
> 
> I wanted now to use variable length datatypes. To test, I ran the
> example C code from HDF5 (h5ex_t_vlen.c). When I try to open the
> produced file h5ex_t_vlen.h5 with pytables, I get a very similar
> warning as in the other example (see below). Is it not possible to
> use variable length datatypes with pytables? Unfortunately, I will
> need at least some similar construct. The data I want to write
> into hdf5 tables comes in as events. Each event consists of a number
> of hits (which
> is a c-struct), and each event has a different number of hits (1 to
> 64). Is it possible
> to read such kind of data with pytables?

Not directly, but you can achieve the same functionality by using a 
VLArray object as a companion of the Table.  In Table you can put all 
your tabular data, plus an additional column that specifies in which 
VLArray row is kept the variable length information.  When taken 
together, Table+VLArray behaves as a table being able to keep variable 
length data.

Hope this heps,

-- 
Francesc Alted

------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Pytables-users mailing list
Pytables-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pytables-users

Reply via email to