2016-02-20 118 views

回答

1
>>> import numpy as np 
>>> a = np.asarray([[3, 7, 5, 1], [23, 12, 42, 25]]) 
>>> a 
array([[ 3, 7, 5, 1], 
     [23, 12, 42, 25]]) 
>>> a[1] 
array([23, 12, 42, 25]) 
>>> np.argmax(a[1]) 
2 
相關問題