Hi Francesc,
Hi Jan,
Sorry for the delay on answering this. We are pretty busy working in the
2.0 beta2 release.
No problem. Looks like it's coming along nicely.
Maybe in a future
(PyTables 3.0?) we will introduce fully nested Column definitions
through the introduction of a more flexible Atom class. But this is only
something that Ivan and me have been talking about quite informally.
That would be totally awesome. I'm looking to port the AIDA format (
aida.freehep.org) to a hdf5 backend.
Somebody already did that with the C++ implementation at
http://openscientist.lal.in2p3.fr (not for tuples in tuples, though).
I'm going to start a different thread on this, because I'm going to need
some advice.
The other way would be to have momentum a class with three components
> x, y, z.
> That would be OK, too, but then will I be able to assign the values to
> the row all at once?
> Something like
> row = table.row
> row['momentum'] = (1, 2, 3)
Yes. That works in 2.0 right out-of-the-box (but not in 1.x series).
This is mainly due to the fact that the underlying NumPy recarray buffer
does support these kind of assignments. See the attachment for a
complete example on this capability and also the different ways to
retrieve the momentum (a nested field).
This is excellent. It still makes the class definition a bit longer than
absolutely necessary, but I take that any day. This is going to make my life
much easier.
Have a look at it and tell us if they fulfill your
requirements. If you think that the mechanism can be improved in some
way or another, it would be nice if you tell us about your thoughts.
I think this is pretty much what I would expect from a recarray, and it
helps a lot. Since there are no vector or LorentzVector classes in numpy or
scipy, I am playing with a couple of implementations, but I want to make
sure that it can easily be persisted in pytables. I think your examples give
me the missing pieces to the puzzle.
Thanks again,
Jan
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Pytables-users mailing list
Pytables-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pytables-users