Is the extended slice attribute notation supported? It is mentioned on
the http://www.pytables.org/moin/HintsForSQLUsers#Updatingdata, and is
said to allow writing data to arbitrary row coordinates, like so:
rows = [
('foo', 0.0, 0.0, 150.0),
('bar', 0.5, 0.0, 100.0),
('foo', 1.0, 1.0, 25.0)
]
rownos = [2, 735, 371913476]
tbl[rownos] = rows
I get ValueError: Non-valid index or slice: [3, 4, 5] (table.py, line
1709, pytables 2.0.3) when I try to run the following code:
h5=tables.openFile('idx-std-1.x.h5', 'a')
h5.root.table[[3,4,5]] = [('col1',3,4,5), ('col2',5,6,7), ('col1',5,6,7)]
If extended slicing isn't supported, is there a better way to deal
with sparse indices than:
for row_id, datum in zip(row_ids, coldata):
col[row_id] = datum
Thanks,
Eric
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Pytables-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pytables-users