Simple as that...
Thanks!

-----Original Message-----
From: numpy-discussion-boun...@scipy.org
[mailto:numpy-discussion-boun...@scipy.org] 
      On Behalf Of Geordie McBain

Convert days to np.array, then you can index it with your indexmin:

days = [10, 20, 31, 41, 51, 59, 69, 79, 90, 100]
mydays = np.array (days)
indexmin=np.array([[0, 2, 1],
                  [6, 7, 3],
                  [5, 5, 8]])
print mydays[indexmin]

=>

[[10 31 20]
 [69 79 41]
 [59 59 90]]
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


------
If you have received this transmission in error please notify us immediately by 
return e-mail and delete all copies. If this e-mail or any attachments have 
been sent to you in error, that error does not constitute waiver of any 
confidentiality, privilege or copyright in respect of information in the e-mail 
or attachments. 



Please consider the environment before printing this email.

------

_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to