def minimum_position(input, labels=None, index=None):
dims = numpy.array(numpy.asarray(input).shape)<EOL>dim_prod = numpy.cumprod([<NUM_LIT:1>] + list(dims[:<NUM_LIT:0>:-<NUM_LIT:1>]))[::-<NUM_LIT:1>]<EOL>result = _select(input, labels, index, find_min_positions=True)[<NUM_LIT:0>]<EOL>if numpy.isscalar(result):<EOL><INDENT>return tuple((result // dim_prod) % dims)<EOL><DEDENT>return [tuple(v) for v in (result.reshape(-<NUM_LIT:1>, <NUM_LIT:1>) // dim_prod) % dims]<EOL>
Find the positions of the minimums of the values of an array at labels.

Parameters
----------
input : array_like
    Array_like of values.
labels : array_like, optional
    An array of integers marking different regions over which the
    position of the minimum value of `input` is to be computed.
    `labels` must have the same shape as `input`. If `labels` is not
    specified, the location of the first minimum over the whole
    array is returned.

    The `labels` argument only works when `index` is specified.
index : array_like, optional
    A list of region labels that are taken into account for finding the
    location of the minima. If `index` is None, the ``first`` minimum
    over all elements where `labels` is non-zero is returned.

    The `index` argument only works when `labels` is specified.

Returns
-------
output : list of tuples of ints
    Tuple of ints or list of tuples of ints that specify the location
    of minima of `input` over the regions determined by `labels` and
    whose index is in `index`.

    If `index` or `labels` are not specified, a tuple of ints is
    returned specifying the location of the first minimal value of `input`.

See also
--------
label, minimum, median, maximum_position, extrema, sum, mean, variance,
standard_deviation