[Numpy-discussion] indexing question

Neal Becker ndbecker2@gmail....
Mon Jun 21 14:01:04 CDT 2010

Can I find an efficient way to do this?

I have a 2d array, A, 80 rows by 880 columns.

I have a vector, B, of length 80, with scalar indexes.

I want a vector output C where
C[i] = A[b[i],i] (i=0,879)

More information about the NumPy-Discussion mailing list