:param x_min: minumum value
    :param x_max: maximum value
    :param n: number of steps
    :returns: an array of n values from x_min to x_max
432277
def logscale(x_min, x_max, n):
    
    if not (isinstance(n, int) and n > 0):
        raise ValueError('n must be a positive integer, got %s' % n)
    if x_min <= 0:
        raise ValueError('x_min must be positive, got %s' % x_min)
    if x_max <= x_min:
        raise ValueError('x_max (%s) must be bigger than x_min (%s)' %
                         (x_max, x_min))
    delta = numpy.log(x_max / x_min)
    return numpy.exp(delta * numpy.arange(n) / (n - 1)) * x_min
762666
def intervals(_min, _max=None, size=1):
    
    if _max == None:
        _max = _min
        _min = 0
    _max = int(mo_math.ceiling(_max))
    _min = int(mo_math.floor(_min))

    output = ((x, min(x + size, _max)) for x in _range(_min, _max, size))
    return output
121462
def Axn(mt, x, n):
    
    return (mt.Mx[x] - mt.Mx[x + n]) / mt.Dx[x]
173839
def Min(a, axis, keep_dims):
    
    return np.amin(a, axis=axis if not isinstance(axis, np.ndarray) else tuple(axis),
                   keepdims=keep_dims),
1356629
def normalize(X):
        
        a = X.min(axis=0)
        b = X.max(axis=0)
        return (X - a[np.newaxis, :]) / ((b - a)[np.newaxis, :])
15301
def max(self, axis=None, skipna=True, *args, **kwargs):
        
        # TODO: skipna is broken with max.
        # See https://github.com/pandas-dev/pandas/issues/24265
        nv.validate_max(args, kwargs)
        nv.validate_minmax_axis(axis)

        mask = self.isna()
        if skipna:
            values = self[~mask].asi8
        elif mask.any():
            return NaT
        else:
            values = self.asi8

        if not len(values):
            # short-circut for empty max / min
            return NaT

        result = nanops.nanmax(values, skipna=skipna)
        # Don't have to worry about NA `result`, since no NA went in.
        return self._box_func(result)
758350
public static float max(float[] x) {
        float m = Float.NEGATIVE_INFINITY;

        for (float n : x) {
            if (n > m) {
                m = n;
            }
        }

        return m;
    }
1144900
def prox_min(X, step, thresh=0):
    
    thresh_ = _step_gamma(step, thresh)
    below = X - thresh_ < 0
    X[below] = thresh_
    return X
823752
def fit(self, X, y=None):
        
        X = array2d(X)
        self.n_features = X.shape[1]
        self.n_bins = self.n_bins_per_feature ** self.n_features

        if self.min is None:
            min = np.min(X, axis=0)
        elif isinstance(self.min, numbers.Number):
            min = self.min * np.ones(self.n_features)
        else:
            min = np.asarray(self.min)
            if not min.shape == (self.n_features,):
                raise ValueError('min shape error')

        if self.max is None:
            max = np.max(X, axis=0)
        elif isinstance(self.max, numbers.Number):
            max = self.max * np.ones(self.n_features)
        else:
            max = np.asarray(self.max)
            if not max.shape == (self.n_features,):
                raise ValueError('max shape error')

        self.grid = np.array(
            [np.linspace(min[i] - EPS, max[i] + EPS, self.n_bins_per_feature + 1)
             for i in range(self.n_features)])

        return self
669074
def _nan_minmax_object(func, fill_value, value, axis=None, **kwargs):
    
    valid_count = count(value, axis=axis)
    filled_value = fillna(value, fill_value)
    data = getattr(np, func)(filled_value, axis=axis, **kwargs)
    if not hasattr(data, 'dtype'):  # scalar case
        data = dtypes.fill_value(value.dtype) if valid_count == 0 else data
        return np.array(data, dtype=value.dtype)
    return where_method(data, valid_count != 0)
158063
def fn_max(self, a, axis=None):
        

        return numpy.nanmax(self._to_ndarray(a), axis=axis)
1247122
def min(self):
        
        results = [x.ufuncs.min() for x in self.elem]
        return np.min(results)
277087
def min(self):
        
        return self._constructor(self.values.min(axis=self.baseaxes, keepdims=True))
217958
def xAxisIsMinor(self):
        '''
        
        '''
        return min(self.radius.x, self.radius.y) == self.radius.x
986286
def _get_ln_a_n_max(self, C, n_sites, idx, rup):
        
        ln_a_n_max = C["lnSC1AM"] * np.ones(n_sites)
        for i in [2, 3, 4]:
            if np.any(idx[i]):
                ln_a_n_max[idx[i]] += C["S{:g}".format(i)]
        return ln_a_n_max
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
1180866
def max_min_projection(self, axis=2):
        
        if axis >= size(self.value_shape):
            raise Exception('Axis for projection (%s) exceeds '
                            'image dimensions (%s-%s)' % (axis, 0, size(self.value_shape)-1))

        new_value_shape = list(self.value_shape)
        del new_value_shape[axis]
        return self.map(lambda x: amax(x, axis) + amin(x, axis), value_shape=new_value_shape)