scipy.sparse.dia_matrix. tocsr# dia_matrix.tocsr(copy=False)[source]# 將此陣列/矩陣轉換為壓縮稀疏列格式。 當 copy=False 時,此陣列/矩陣與產生的 csr_array/matrix 之間可能會共用資料/索引。