def combine(self, blocks, copy=True):
if len(blocks) == <NUM_LIT:0>:<EOL><INDENT>return self.make_empty()<EOL><DEDENT>indexer = np.sort(np.concatenate([b.mgr_locs.as_array<EOL>for b in blocks]))<EOL>inv_indexer = lib.get_reverse_indexer(indexer, self.shape[<NUM_LIT:0>])<EOL>new_blocks = []<EOL>for b in blocks:<EOL><INDENT>b = b.copy(deep=copy)<EOL>b.mgr_locs = algos.take_1d(inv_indexer, b.mgr_locs.as_array,<EOL>axis=<NUM_LIT:0>, allow_fill=False)<EOL>new_blocks.append(b)<EOL><DEDENT>axes = list(self.axes)<EOL>axes[<NUM_LIT:0>] = self.items.take(indexer)<EOL>return self.__class__(new_blocks, axes, do_integrity_check=False)<EOL>
return a new manager with the blocks