Switch sparse matrix to CSR format.