def batch_scan_layers(self, cells: np.ndarray = None, genes: np.ndarray = None, axis: int = <NUM_LIT:0>, batch_size: int = <NUM_LIT:1000>, layers: Iterable = None) -> Iterable[Tuple[int, np.ndarray, Dict]]:
deprecated("<STR_LIT>")<EOL>if cells is None:<EOL><INDENT>cells = np.fromiter(range(self.shape[<NUM_LIT:1>]), dtype='<STR_LIT:int>')<EOL><DEDENT>if genes is None:<EOL><INDENT>genes = np.fromiter(range(self.shape[<NUM_LIT:0>]), dtype='<STR_LIT:int>')<EOL><DEDENT>if layers is None:<EOL><INDENT>layers = self.layers.keys()<EOL><DEDENT>if axis == <NUM_LIT:1>:<EOL><INDENT>cols_per_chunk = batch_size<EOL>ix = <NUM_LIT:0><EOL>while ix < self.shape[<NUM_LIT:1>]:<EOL><INDENT>cols_per_chunk = min(self.shape[<NUM_LIT:1>] - ix, cols_per_chunk)<EOL>selection = cells - ix<EOL>selection = selection[np.where(np.logical_and(selection >= <NUM_LIT:0>, selection < cols_per_chunk))[<NUM_LIT:0>]]<EOL>if selection.shape[<NUM_LIT:0>] == <NUM_LIT:0>:<EOL><INDENT>ix += cols_per_chunk<EOL>continue<EOL><DEDENT>vals = dict()<EOL>for key in layers:<EOL><INDENT>vals[key] = self.layers[key][:, ix:ix + cols_per_chunk]<EOL>vals[key] = vals[key][genes, :]<EOL>vals[key] = vals[key][:, selection]<EOL><DEDENT>yield (ix, ix + selection, vals)<EOL>ix += cols_per_chunk<EOL><DEDENT><DEDENT>if axis == <NUM_LIT:0>:<EOL><INDENT>rows_per_chunk = batch_size<EOL>ix = <NUM_LIT:0><EOL>while ix < self.shape[<NUM_LIT:0>]:<EOL><INDENT>rows_per_chunk = min(self.shape[<NUM_LIT:0>] - ix, rows_per_chunk)<EOL>selection = genes - ix<EOL>selection = selection[np.where(np.logical_and(selection >= <NUM_LIT:0>, selection < rows_per_chunk))[<NUM_LIT:0>]]<EOL>if selection.shape[<NUM_LIT:0>] == <NUM_LIT:0>:<EOL><INDENT>ix += rows_per_chunk<EOL>continue<EOL><DEDENT>vals = dict()<EOL>for key in layers:<EOL><INDENT>vals[key] = self.layers[key][ix:ix + rows_per_chunk, :]<EOL>vals[key] = vals[key][selection, :]<EOL>vals[key] = vals[key][:, cells]<EOL><DEDENT>yield (ix, ix + selection, vals)<EOL>ix += rows_per_chunk<EOL><DEDENT><DEDENT>
**DEPRECATED** - Use `scan` instead