Ticket #198 (new enhancement)

Opened 7 weeks ago

Last modified 7 days ago

Add support for extended slicing in Leaf objects

Reported by: faltet Owned by: somebody
Priority: major Component: PyTables
Version: Keywords:
Cc:

Description

For example, given this:

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]

providing support for extended slice would allow to write this:

tbl[rownos] = rows

instead of:

for row_id, datum in zip(rownos, rows):
     tbl[row_id] = datum

Also, this support can leverage the sparse read/write capability of HDF5.

Change History

Changed 7 days ago by GabrielBeckers

Just a note to let you know that this feature would be very useful to me. I run into a lot of situations where I would like to use a list as an index for an (E)Array, e.g. ar[:10,[2,5,7]]. The example in the ticket is about a Table, but I am hoping that Arrays will be included.

Cheers, Gabriel

Note: See TracTickets for help on using tickets.