[Numpy-discussion] Another dumb structured array question

David Warde-Farley dwf@cs.toronto....
Wed Sep 30 16:46:18 CDT 2009


On 30-Sep-09, at 9:51 AM, Travis Oliphant wrote:

> Try  (with a later version of NumPy --- possibly trunk):
>
> arr[['foo', 'bar']]
>
> (i.e. with a list instead of a tuple)

Aha! Thanks Travis.

I guess tuples for multi-dimensional indexing _and_ multi-field  
indexing would be semantically awkward, come to think of it.

David



More information about the NumPy-Discussion mailing list