From: Curious J. <cur...@gm...> - 2006-12-13 22:27:20
|
Actually, I just found the problem. Apparently, changing the table type from numpy to numarray fixes the problem. So it appears that I just encountered the problem because I was trying to run a quick test over a subsample, which I got from a slicing operation. And it looks like the result of that slicing operation differs depending on the type of the table (numpy vs. numarray). Ah, heck, I don't need slicing, so I'll just keep iterating over the whole tree. On 12/13/06, Curious Jan <cur...@gm...> wrote: > > Hi list, > > I'm trying to model a high-energy physics event in pytables and have been > reasonably successful so far. > However, I just changed the structure of my nested tables, and now I can't > access the columns by name anymore. > I try the following: > > from tables import openFile > fh = openFile('bug.h5') > x = fh.root.bug[0] > print x['Baryon1'] > print x['Baryon1/Gamma'] # doesn't work > y = x['Baryon1'] > print y['Gamma'] # works > > I find this very, very strange, and would appreciate comments/suggestion. > Regards, > Jan > > > |