def map(self, f_list: List[Callable[[np.ndarray], int]], axis: int = <NUM_LIT:0>, chunksize: int = <NUM_LIT:1000>, selection: np.ndarray = None) -> List[np.ndarray]:
if hasattr(f_list, '<STR_LIT>'):<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>result = []<EOL>if axis == <NUM_LIT:0>:<EOL><INDENT>rows_per_chunk = chunksize<EOL>for i in range(len(f_list)):<EOL><INDENT>result.append(np.zeros(self.shape[<NUM_LIT:0>]))<EOL><DEDENT>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>if selection is not None:<EOL><INDENT>chunk = self[ix:ix + rows_per_chunk, :][:, selection]<EOL><DEDENT>else:<EOL><INDENT>chunk = self[ix:ix + rows_per_chunk, :]<EOL><DEDENT>for i in range(len(f_list)):<EOL><INDENT>result[i][ix:ix + rows_per_chunk] = np.apply_along_axis(f_list[i], <NUM_LIT:1>, chunk)<EOL><DEDENT>ix = ix + rows_per_chunk<EOL><DEDENT><DEDENT>elif axis == <NUM_LIT:1>:<EOL><INDENT>cols_per_chunk = chunksize<EOL>for i in range(len(f_list)):<EOL><INDENT>result.append(np.zeros(self.shape[<NUM_LIT:1>]))<EOL><DEDENT>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>if selection is not None:<EOL><INDENT>chunk = self[:, ix:ix + cols_per_chunk][selection, :]<EOL><DEDENT>else:<EOL><INDENT>chunk = self[:, ix:ix + cols_per_chunk]<EOL><DEDENT>for i in range(len(f_list)):<EOL><INDENT>result[i][ix:ix + cols_per_chunk] = np.apply_along_axis(f_list[i], <NUM_LIT:0>, chunk)<EOL><DEDENT>ix = ix + cols_per_chunk<EOL><DEDENT><DEDENT>return result<EOL>
Apply a function along an axis without loading the entire dataset in memory.

Args:
        f_list (list of func):		Function(s) that takes a numpy ndarray as argument

        axis (int):		Axis along which to apply the function (0 = rows, 1 = columns)

        chunksize (int): Number of rows (columns) to load per chunk

        selection (array of bool): Columns (rows) to include

Returns:
        numpy.ndarray result of function application

        If you supply a list of functions, the result will be a list of numpy arrays. This is more
        efficient than repeatedly calling map() one function at a time.