From: Alvaro T. C. <al...@mi...> - 2012-04-30 17:09:20
|
Hi all, I created a table: >>> joins.createTable('/','spikes',{'t20k':pt.Int32Col(),'tetrode':pt.UInt8Col(), 'unit':pt.UInt8Col()},'Spike times') I populated it >>> joins.root.spikes.append(zip(np.arange(100),np.zeros(100), 3*np.ones(100))) now if I do >>> joins.root.spikes.cols.tetrode[:] = np.ones(100) I can see the updated value (all ones instead of zeros) If I fetch all the table in memory, >>> joins.root.spikes[:] I still see only the original zeros, i.e. the column update has not propagated If I add another 100 rows like above and check joins.root.spikes.cols.tetrode, then I only see the original ones, and not the added zeros In the middle I .flush() table and file abundantly; that changes nothing. This I did following the instruction in http://www.pytables.org/moin/HintsForSQLUsers (search for the line: tbl.cols.temperature[6:13:3] = cols[0] ) Is this the intended behaviour? It's driving me crazy. However >>> joins.root.spikes.col('tetrode') sees the same as joins.root.spikes[:] but cannot be assigned to. Álvaro. -á. |