Returns a list of 2-tuples, e.g. [(-3.14, 3.14), (-0.001, 0.001)],
        one tuple per parameter, giving min and max for that parameter.
504414
def getActorLimits(self):
        
        generators = [g for g in self.env.case.online_generators
                      if g.bus.type != REFERENCE]
        limits = []
        for g in generators:
            limits.append((g.p_min, g.p_max))

        logger.info("Actor limits: %s" % limits)

        return limits
323001
def minmax(self, minimum=None, maximum=None):
		

		# If neither minimum or maximum is set, this is a getter
		if(minimum is None and maximum is None):
			return {"minimum": self._minimum, "maximum": self._maximum}

		# If the minimum is set
		if minimum is not None:

			# If the value is not a valid int or long
			if not isinstance(minimum, (int, long)):

				# If it's a valid representation of an integer
				if isinstance(minimum, basestring) \
					and _typeToRegex['int'].match(minimum):

					# Convert it
					minimum = int(minimum, 0)

				# Else, raise an error
				else:
					raise ValueError('minimum')

			# If it's below zero
			if minimum < 0:
				raise ValueError('minimum')

			# Store the minimum
			self._minimum = minimum

		# If the maximum is set
		if maximum is not None:

			# If the value is not a valid int or long
			if not isinstance(maximum, (int, long)):

				# If it's a valid representation of an integer
				if isinstance(maximum, basestring) \
					and _typeToRegex['int'].match(maximum):

					# Convert it
					maximum = int(maximum, 0)

				# Else, raise an error
				else:
					raise ValueError('minimum')

			# It's below zero
			if maximum < 0:
				raise ValueError('maximum')

			# If we also have a minimum and the max is somehow below it
			if self._minimum \
				and maximum < self._minimum:
				raise ValueError('maximum')

			# Store the maximum
			self._maximum = maximum
190752
def norm(self, limits=None):
        
        kwargs = {}
        if limits is not None:
            kwargs = {'min': limits[0], 'max': limits[1]}
        return dim(self, norm, **kwargs)
226184
@SuppressWarnings("unchecked")
    public static <T1, T2, T3, T4> Tuple4<T1, T2, T3, T4>[] zip(T1[] arr1, T2[] arr2, T3[] arr3, T4[] arr4) {
        int resultSize = _max(arr1.length, arr2.length, arr3.length, arr4.length);
        Tuple4[] result = new Tuple4[resultSize];

        for (int i = 0; i < resultSize; i++)
            result[i] = tuple(next(arr1, i), next(arr2, i), next(arr3, i), next(arr4, i));

        return result;
    }
1368683
def _std_tuple_of(var=None, std=None, interval=None):
    

    if std is not None:
        if np.isscalar(std):
            std = (std,)
        return std


    if interval is not None:
        if np.isscalar(interval):
            interval = (interval,)

        return norm.interval(interval)[1]

    if var is None:
        raise ValueError("no inputs were provided")

    if np.isscalar(var):
        var = (var,)
    return np.sqrt(var)
432150
def _argparse_minmax_type(self, string):
        """"""
        value = float(string)
        if value < 0 or value > 8:
            raise argparse.ArgumentTypeError(
                '%s must be between 0.0 and 8.0' % string,
            )

        return value
1203130
def middle(self):
        
        return (self.min_x + self.max_x) / 2, (self.min_y + self.max_y) / 2
348359
def sub(v1, v2):
    '''
    '''
    return tuple(a - b for a, b in zip(v1, v2))
183739
public final Tuple2<Tuple1<T1>, Tuple4<T2, T3, T4, T5>> split1() {
        return new Tuple2<>(limit1(), skip1());
    }
260
def max_pairs(shape):
    """"""

    if not isinstance(shape, (tuple, list)):
        x = get_length(shape)
        n = int(x * (x - 1) / 2)

    elif (isinstance(shape, (tuple, list)) and len(shape) == 1):
        x = get_length(shape[0])
        n = int(x * (x - 1) / 2)

    else:
        n = numpy.prod([get_length(xi) for xi in shape])

    return n
547705
public final Tuple2<Tuple1<T1>, Tuple5<T2, T3, T4, T5, T6>> split1() {
        return new Tuple2<>(limit1(), skip1());
    }
14744
def _min(self):
        """"""
        return (
            self.range[0] if (self.range and self.range[0] is not None) else
            (min(self._values) if self._values else None)
        )
154073
def scale_between(minval, maxval, numStops):
    

    scale = []

    if numStops < 2:
        return [minval, maxval]
    elif maxval < minval:
        raise ValueError()
    else:
        domain = maxval - minval
        interval = float(domain) / float(numStops)
        for i in range(numStops):
            scale.append(round(minval + interval * i, 2))
        return scale
176307
def bounds(self):
        
        bounds = []
        for p in self.params:
            if p.fixed:
                if p.value >= 0.0:
                    bounds.append([np.nextafter(p.value, 0), p.value])
                else:
                    bounds.append([p.value, np.nextafter(p.value, 0)])
            else:
                bounds.append([p.min, p.max])
        return bounds
775214
public static <T> List<T> minList (Iterable<T> iterable, Comparator<? super T> comp)
    {
        return maxList(iterable, java.util.Collections.reverseOrder(comp));
    }
467115
def get_linear_points(self):
        
        points = ffi.new('double[4]')
        _check_status(cairo.cairo_pattern_get_linear_points(
            self._pointer, points + 0, points + 1, points + 2, points + 3))
        return tuple(points)
348060
public static double min(DoubleTuple t)
    {
        return DoubleTupleFunctions.reduce(
            t, Double.POSITIVE_INFINITY, Math::min);
    }