[Numpy-discussion] np.choose() question

Andreas Hilboll lists@hilboll...
Tue Jun 8 14:08:46 CDT 2010


Hi,

> newtimes = [times[idx[x][y]] for x in range(2) for y in range(2)]
> np.array(newtimes).reshape(2,2)
> array([[104, 102],
>            [103, 101]])

Great, thanks a lot!

Cheers,

Andreas.



More information about the NumPy-Discussion mailing list