[Numpy-discussion] np.choose() question

Andreas lists@hilboll...
Tue Jun 8 14:52:29 CDT 2010


Hi,

actually, I meant to reply to Mark's mail, as I used his solution ;)

Thanks!

On 06/08/2010 09:21 PM, Gökhan Sever wrote:
> If we were at so or ask.scipy I would vote for Mark's solution :)
> 
> Usually in cases like yours, I tend to use the shortest version of the
> solutions.
> 
> On Tue, Jun 8, 2010 at 2:08 PM, Andreas Hilboll <lists@hilboll.de
> <mailto:lists@hilboll.de>> wrote:
> 
>     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.
> 
>     _______________________________________________
>     NumPy-Discussion mailing list
>     NumPy-Discussion@scipy.org <mailto:NumPy-Discussion@scipy.org>
>     http://mail.scipy.org/mailman/listinfo/numpy-discussion
> 
> 
> 
> 
> -- 
> Gökhan
> 
> 
> 
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion


More information about the NumPy-Discussion mailing list