Creating DOK matrix in scipy

前端 未结 0 1246
余生分开走
余生分开走 2021-01-05 23:05

I have numpy arrays I need to convert to DOK format. Why does this work:

x = np.asarray([1, 0, 0])
y = scipy.sparse.dok_matrix(scipy.sparse.csr_matrix(x))


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题