SciPy

scipy.sparse.dok_matrix.transpose

dok_matrix.transpose()[source]

Return the transpose