scipy.sparse
scipy.sparse.dok_matrix.copy
scipy.sparse.dok_matrix.dot
dok_matrix.
diagonal
Returns the main diagonal of the matrix