python 生成稀疏矩阵

from scipy.sparse import coo_matrix

row = [2,2,3,2]

col = [3,4,2,3]

c = coo_matrix((data,(row,col)),shape=(5,6)) 

猜你喜欢

转载自blog.csdn.net/u_7890/article/details/82813921