創造矩陣(多維數組)
Python numpy 提取矩陣的某一行或某一列
https://blog.csdn.net/luoganttcc/article/details/74080768

刪除矩陣:https://www.jb51.net/article/139764.htm
numpy中的delete刪除數組整行和整列的實例
1.刪除一列
>>> dataset=[[1,2,3],[2,3,4],[4,5,6]] >>> import numpy as np >>> dataset = np.delete(dataset, -1, axis=1) >>> dataset array([[1, 2], [2, 3], [4, 5]])
2.刪除多列
arr = np.array([[1,2,3,4], [5,6,7,8], [9,10,11,12]]) np.delete(arr, [1,2], axis=1) array([[ 1, 4], [ 5, 8], [ 9, 12]])
刪除列:
1.刪除第i行和多行操作
x = numpy.delete(x,i, axis = 0)
矩陣中元素的定位:
Python擴展庫numpy中where()函數的三種用法
https://blog.csdn.net/oh5W6HinUg43JvRhhB/article/details/80796594
dd0max=np.where(list_dd0==np.max(list_dd0)) #0最多的是哪一列
