ccount for computing the minima. If index is None, the minimum over all elements where `labels` is non-zero is returned. Returns ------- minimum : float or list of floats List of minima of `input` over the regions determined by `labels` and whose index is in `index`. If `index` or `labels` are not specified, a float is returned: the minimal value of `input` if `labels` is None, and the minimal value of elements where `labels` is greater than zero if `index` is None. See Also -------- label, maximum, median, minimum_position, extrema, sum, mean, variance, standard_deviation Notes ----- The function returns a Python list and not a NumPy array, use `np.array` to convert the list to an array. Examples -------- >>> from scipy import ndimage >>> import numpy as np >>> a = np.array([[1, 2, 0, 0], ... [5, 3, 0, 4], ... [0, 0, 0, 7], ... [9, 3, 0, 0]]) >>> labels, labels_nb = ndimage.label(a) >>> labels array([[1, 1, 0, 0], [1, 1, 0, 2], [0, 0, 0, 2], [3, 3, 0, 0]]) >>> ndimage.minimum(a, labels=labels, index=np.arange(1, labels_nb + 1)) [1.0, 4.0, 3.0] >>> ndimage.minimum(a) 0.0 >>> ndimage.minimum(a, labels=labels) 1.0 T)