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 <mju...@cfa.harvard.edu> wrote:

> Hi Francesc et al.,
>        I've encountered an inconsistency with VLArray.__getitem__().
> Specifically:
>
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Pytables-users mailing list
Pytables-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pytables-users

Reply via email to