SciPy

scipy.sparse.dia_matrix.todia

dia_matrix.todia(copy=False)[source]