Hello,

I am writing a data acquisition client which receives a single index with each 
new data point. I need to use that index to update some multidimensional 
arrays. Is it possible to do this with pytables, without loading each array 
into memory? I was hoping I could do something like:

t.root.entry.myarray.flat[i] = val

but CArrays do not have a flat iterator. Is there a better solution than 
this?:

a = t.root.entry.myarray[:]
a.flat[i] = val
t.root.entry.myarray[:] = a

I am surprised that even works, since myarray is a CArray and myarray[:] is an 
ndarray. I didn't expect the file to be updated, but it was. Could someone 
explain why?

I could also calculate the multidimensional index based on the shape of 
myarray, but it would be really convenient if CArray provided a flat view of 
the data.

Thanks,
Darren

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Pytables-users mailing list
Pytables-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pytables-users

Reply via email to