From: Antonio V. <val...@co...> - 2005-07-25 10:57:39
|
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 pytables = 2-d > array > data[x,y]=3D0 # set the submatrix defined by x rows and y columns to = 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 anot= her I think that what you are asking for can't be done in an "elegant" way. HDF5 supports hyperslabs selection that is powerfull and elegant but it=20 requires reqular spacing in the selection, see=20 http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5S.html#Dataspace-SelectHyperslab In order to use hyperslabs you have to be able to express the sub-matrix=20 selection in terms of "start, stride, count, and block". It seems to me that it is not your case. > Sincerely, > > Bernard KAPLAN > > > > ------------------------------------------------------- > 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_id=3D7477&alloc_id=3D16492&op=3Dcl= ick > _______________________________________________ > Pytables-users mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pytables-users ciao --=20 Antonio Valentino |