scipy.sparse.dia_matrix. tocsr# dia_matrix.tocsr(copy=False)[source]# 将此数组/矩阵转换为压缩稀疏行格式。 使用 copy=False,此数组/矩阵和生成的 csr_array/矩阵之间可以共享数据/索引。