Scipy.sparse中coo_matrix、csc_matrix、csr_matrix、lil_matrix辨析
简介1.coo_matrix:坐标格式的矩阵(Coodrdinateformatmatrix)data=[1,1,1]row=[0,1,1]col=[0,1,1]matrix=sp.coo_matrix((data,(row,col)),shape=(3,3))matrix.todense()out:matrix([[1,0,0],[0,2,0],[0,0,0]])优点:不同稀疏格式间转换效率高(