python num[y array

 

http://sebug.net/paper/books/scipydoc/numpy_intro.html

 

npArr1=np.array([1,2,3],[4,5,6],[7,8,9]])

npArr1[0]  #0th row

npArr1[0][1] #oth row ,1stcolumn

npArr1[:,0] #0column

 

>>> npArr2[0:2,1] #1th column, 0,1 row
array([2, 4])

 

posted @ 2015-01-01 07:23  zyip  阅读(202)  评论(0编辑  收藏  举报