def sum_duplicates(self):
if self.has_canonical_format:<EOL><INDENT>return<EOL><DEDENT>self.sort_indices()<EOL>fn = _sparsetools.csr_sum_duplicates<EOL>M,N = self._swap(self.shape)<EOL>fn(M, N, self.indptr, self.indices, self.data)<EOL>self.prune()  <EOL>self.has_canonical_format = True<EOL>
Eliminate duplicate matrix entries by adding them together

        The is an *in place* operation