@docsubst<EOL><INDENT>@stat_1d<EOL>def minmax(self, expression, binby=[], limits=None, shape=default_shape, selection=False, delay=False, progress=None):<DEDENT>
<EOL>@delayed<EOL>def finish(*minmax_list):<EOL><INDENT>value = vaex.utils.unlistify(waslist, np.array(minmax_list))<EOL>value = value.astype(dtype0)<EOL>return value<EOL><DEDENT>@delayed<EOL>def calculate(expression, limits):<EOL><INDENT>task = tasks.TaskStatistic(self, binby, shape, limits, weight=expression, op=tasks.OP_MIN_MAX, selection=selection)<EOL>self.executor.schedule(task)<EOL>progressbar.add_task(task, "<STR_LIT>" % expression)<EOL>return task<EOL><DEDENT>@delayed<EOL>def finish(*minmax_list):<EOL><INDENT>value = vaex.utils.unlistify(waslist, np.array(minmax_list))<EOL>value = value.astype(dtype0)<EOL>return value<EOL><DEDENT>expression = _ensure_strings_from_expressions(expression)<EOL>binby = _ensure_strings_from_expressions(binby)<EOL>waslist, [expressions, ] = vaex.utils.listify(expression)<EOL>dtypes = [self.dtype(expr) for expr in expressions]<EOL>dtype0 = dtypes[<NUM_LIT:0>]<EOL>if not all([k.kind == dtype0.kind for k in dtypes]):<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>progressbar = vaex.utils.progressbars(progress, name="<STR_LIT>")<EOL>limits = self.limits(binby, limits, selection=selection, delay=True)<EOL>all_tasks = [calculate(expression, limits) for expression in expressions]<EOL>result = finish(*all_tasks)<EOL>return self._delay(delay, result)<EOL>
Calculate the minimum and maximum for expressions, possibly on a grid defined by binby.


        Example:

        >>> df.minmax("x")
        array([-128.293991,  271.365997])
        >>> df.minmax(["x", "y"])
        array([[-128.293991 ,  271.365997 ],
                   [ -71.5523682,  146.465836 ]])
        >>> df.minmax("x", binby="x", shape=5, limits=[-10, 10])
        array([[-9.99919128, -6.00010443],
                   [-5.99972439, -2.00002384],
                   [-1.99991322,  1.99998057],
                   [ 2.0000093 ,  5.99983597],
                   [ 6.0004878 ,  9.99984646]])

        :param expression: {expression}
        :param binby: {binby}
        :param limits: {limits}
        :param shape: {shape}
        :param selection: {selection}
        :param delay: {delay}
        :param progress: {progress}
        :return: {return_stat_scalar}, the last dimension is of shape (2)