Tables have a similar inconsistent behavior, which I've had to work around
in a few places as well. See the following example code, which is very
similar to Mario's. "Slice1" is of type numpy.void, while "slice2" is of
type numpy.ndarray.
h = tables.openFile('test.h5',mode='w')
dtype = numpy.format_parser(['i4','i4'],['a','b'],[]).dtype
h.createTable('/','table1',dtype)
table = h.getNode('/','table1')
newRow = numpy.recarray((2,),dtype)
newRow[0] = (0,1)
newRow[1] = (2,3)
table.append(newRow)
slice1 = table[numpy.array([0,1])]
type(slice1) # type is numpy.ndarray
slice2 = table[numpy.array([0])]
type(slice2) # type is numpy.void
On Tue, Oct 26, 2010 at 7:59 PM, Mario Juric <mjuric@...> wrote:
> Hi Francesc et al.,
> I've encountered an inconsistency with VLArray.__getitem__().
> Specifically:
>
