def _insert_many(self, i, j, x):
order = np.argsort(i, kind='<STR_LIT>')  <EOL>i = i.take(order, mode='<STR_LIT>')<EOL>j = j.take(order, mode='<STR_LIT>')<EOL>x = x.take(order, mode='<STR_LIT>')<EOL>do_sort = self.has_sorted_indices<EOL>idx_dtype = get_index_dtype((self.indices, self.indptr),<EOL>maxval=(self.indptr[-<NUM_LIT:1>] + x.size))<EOL>self.indptr = np.asarray(self.indptr, dtype=idx_dtype)<EOL>self.indices = np.asarray(self.indices, dtype=idx_dtype)<EOL>i = np.asarray(i, dtype=idx_dtype)<EOL>j = np.asarray(j, dtype=idx_dtype)<EOL>indices_parts = []<EOL>data_parts = []<EOL>ui, ui_indptr = _compat_unique(i, return_index=True)<EOL>ui_indptr = np.append(ui_indptr, len(j))<EOL>new_nnzs = np.diff(ui_indptr)<EOL>prev = <NUM_LIT:0><EOL>for c, (ii, js, je) in enumerate(izip(ui, ui_indptr, ui_indptr[<NUM_LIT:1>:])):<EOL><INDENT>start = self.indptr[prev]<EOL>stop = self.indptr[ii]<EOL>indices_parts.append(self.indices[start:stop])<EOL>data_parts.append(self.data[start:stop])<EOL>uj, uj_indptr = _compat_unique(j[js:je][::-<NUM_LIT:1>], return_index=True)<EOL>if len(uj) == je - js:<EOL><INDENT>indices_parts.append(j[js:je])<EOL>data_parts.append(x[js:je])<EOL><DEDENT>else:<EOL><INDENT>indices_parts.append(j[js:je][::-<NUM_LIT:1>][uj_indptr])<EOL>data_parts.append(x[js:je][::-<NUM_LIT:1>][uj_indptr])<EOL>new_nnzs[c] = len(uj)<EOL><DEDENT>prev = ii<EOL><DEDENT>start = self.indptr[ii]<EOL>indices_parts.append(self.indices[start:])<EOL>data_parts.append(self.data[start:])<EOL>self.indices = np.concatenate(indices_parts)<EOL>self.data = np.concatenate(data_parts)<EOL>nnzs = np.asarray(np.ediff1d(self.indptr, to_begin=<NUM_LIT:0>), dtype=idx_dtype)<EOL>nnzs[<NUM_LIT:1>:][ui] += new_nnzs<EOL>self.indptr = np.cumsum(nnzs, out=nnzs)<EOL>if do_sort:<EOL><INDENT>self.has_sorted_indices = False<EOL>self.sort_indices()<EOL><DEDENT>self.check_format(full_check=False)<EOL>
Inserts new nonzero at each (i, j) with value x

        Here (i,j) index major and minor respectively.
        i, j and x must be non-empty, 1d arrays.
        Inserts each major group (e.g. all entries per row) at a time.
        Maintains has_sorted_indices property.
        Modifies i, j, x in place.