[Numpy-discussion] Fancy indexing question:

Christopher Barker Chris.Barker@noaa....
Thu Feb 26 15:29:32 CST 2009


Ravi wrote:
> Use ix_:
> 
> In [5]: a[ ix_(i,j) ]
> Out[5]:
> array([[ 5,  7],
>        [13, 15],
>        [17, 19]])

Very nice!


thanks,
-Chris



-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker@noaa.gov


More information about the Numpy-discussion mailing list