From: <phi...@ho...> - 2005-09-07 15:14:09
|
Francesc Altet wrote: >A Tuesday 06 September 2005 16:08, phi...@ho... va escriure: > > >>Sorry that doesn't seem clear. >>No limitations of pytables. >>It's much more that i'm not allowed to use table. >>Arrays are more appreciated to achieve my goal . >> >> > >Ok. But it's a pity because using the filtering capabilities in Table >objects, like: > >[r['pressure'] for r in table if r['latitude'] == X and r['latitude'] == Y] > >is very powerful to do what you are willing to. > > Of course, using python list comprehension in tables is really powerfull. But i can't actually use tables. I have to use arrays. > > >>That could be a good starting point. I only need an ordered list >>containing path of each array of system parameters. >>For example, the attribute could be >>['/parameters/longitude','/parameters/latitude','/parameters/time'] >> >> > >Definitely, that could be a solution if you want to stick with arrays. > > > >>In fact, i'm joining Norbert Nemec in his post from 2005-01-24 11:51 to >>request a convention in pytables to store not only data but also a way >>to link the data. >> >>Here is thye situation, better represented: >> >> >[snipped] > >Ok. I understand better now. With that, what you want is something >similar to: > >pressure.where(pressure.axis.longitude == 0.2 and > pressure.axis.latitude == 0.45 ) > >isn't it? > >Well, I must recognize that the idea is pretty nice. In addition, if >values in latitude and longitude have a direct mapping into indices >(as you seem to suggest), then a binary search on axis could be made >so that finding the indexes should be a very fast operation. > >Well, I think I'll put this suggestion in our TODO file. > >Thanks for your detailed explanation! > > That's exactly the idea behind all. And you go further with the suggestion about the direct mapping into indices. That could be very powerfull. Thanks a lot for taking in account new improvements. Of course, i can give you a hand if you need help. Tell me when you start programming it, we can work together. If you didn't have time, i will try soon to modify pytables code with your rigths. Thanks a lot for your work. Regards, Philippe Collet |