From: Antonio V. <val...@co...> - 2005-07-25 15:33:00
|
Alle 16:44, luned=EC 25 luglio 2005, Bernard KAPLAN ha scritto: > Dear Antonio, > > In hdf5 you can define progressively a selected region (adding elements > one by one) by use of either "H5Sselect_elements" with H5S_SELECT_APPEN= D > or "H5Sselect_hyperslab" with H5S_SELECT_OR. Then you can read or write > the selected elements at once with "H5Dread" or "H5Dwrite". Yes, you are right. The selection operation is not as immediate as in you= r=20 example, but afrer selection you can read all data at once. > Is there a function in pytables that use this functionality ? How would > you do to extract a submatrix in pytables ? I think that at the moment this functionality is not available. Surely=20 Francesk or Ivan can give you more explainations. Usually I get an entire block of data from arrays=20 data =3D h5f.myarray[0:100, 0:100] I never encountered a situation like yours, sorry :(( > Bernard|| > > Antonio Valentino wrote: > >Alle 11:36, luned=EC 25 luglio 2005, Bernard KAPLAN ha scritto: > >>Dear all, > > > >hi Bernard > > > >[...] > > > >>x=3Darray([1,2,5,8]) # row index > >>y=3Darray([0,3,7]) # column index > >>a=3Ddata[x,y] # returns an array of size [4,3], 'data' is a pytable= s 2-d > >>array > >>data[x,y]=3D0 # set the submatrix defined by x rows and y columns t= o 0 > >>data[x,y]=3Drand([4,3]) # update of a submatrix > >>data[x,y]=3Ddata2[x,y] # copy of a submatrix from one array into an= other [...] > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id=16492&op,ick > _______________________________________________ > Pytables-users mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pytables-users --=20 Antonio Valentino |