Returns
        -------
        A tuple consisting of (max, min) of the index.
8987
def _max_min(self):
        
        dtbl = self.datatable

        objs = object_session(self)
        if isinstance(dtbl, Table):
            return objs.query(func.max(dtbl.c.indx).label("max_indx"),
                              func.min(dtbl.c.indx).label("min_indx")).one()
        else:
            raise Exception("Symbol has no datatable")
201616
def out_of_bounds(self, index):
        
        if type(index) is int:
            return self.int_out_of_bounds(index)

        elif type(index) is slice:
            return self.slice_out_of_bounds(index)

        elif type(index) is tuple:

            local_index = []

            for k, item in enumerate(index):

                if type(item) is slice:
                    temp_index = self.slice_out_of_bounds(item, k)

                elif type(item) is int:
                    temp_index = self.int_out_of_bounds(item, k)
                # FIXME: will fail if item is no int or slice!
                if temp_index is None:
                    return temp_index

                local_index.append(temp_index)

            return tuple(local_index)
817567
public int getIndexMax() {
        int indexMax = 0;
        double max = getEigenvalue(0).getMagnitude2();

        final int N = getNumberOfEigenvalues();
        for( int i = 1; i < N; i++ ) {
            double m = getEigenvalue(i).getMagnitude2();
            if( m > max ) {
                max = m;
                indexMax = i;
            }
        }

        return indexMax;
    }
547805
def max(self, key=None):
        
        if key is None:
            return self.reduce(max)
        return self.reduce(lambda a, b: max(a, b, key=key))
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
141517
def get_min_max_mag(self):
        
        m1s, m2s = [], []
        for mfd in self:
            m1, m2 = mfd.get_min_max_mag()
            m1s.append(m1)
            m2s.append(m2)
        return min(m1s), max(m2s)
859719
def values(self):
        
        if self.is_finite:
            return np.arange(self.min, self.max + 1, dtype = self.dtype)
        else:
            return self.example_point
870980
def micro_indices(self):
        """"""
        return tuple(sorted(idx for part in self.partition for idx in part))
288879
function iterRanges(min, max, padding) {
  let index = min;

  return {
    reset: () => { index = min; },
    next: () => {
      if (index <= max) {
        let value = index;
        if (padding) {
          value = padNumber(index, padding);
        }
        index += 1;

        return {
          value,
          done: false,
        };
      }
      return { done: true };
    },
  };
}
902195
def maxBoundSize(self):
        """"""
        b = self.polydata(True).GetBounds()
        return max(abs(b[1] - b[0]), abs(b[3] - b[2]), abs(b[5] - b[4]))
1108243
def min(self, key=None):
        

        def _min(result, item):
            val = data_get(item, key)

            if result is None or val < result:
                return value

            return result

        return self.reduce(_min)
1205314
def _get_end_index(self):
        """"""
        return max(self.index + self.source_window,
                   self._get_target_index() + self.target_window)
216141
def min(self):
        
        res = self._qexec("min(%s)" % self._name)
        if len(res) > 0:
            self._min = res[0][0]
        return self._min
1140620
def range_min(self, i, k):
        
        return self._range_min(1, 0, self.N, i, k)
1101354
def min(self, default=None):
        
        return numpy.asscalar(numpy.min(self.values)) if self.values else default
613964
def simple_nearest_indices(xs,res):
    '''
    
    '''
    maxs = [max(a) for a in xs]
    mins = [min(a) for a in xs]
    XS = [np.linspace(mn, mx, r) for mn,mx,r in zip(mins,maxs,res)];
    XS = tuple(np.meshgrid(*XS,indexing='ij'));
    if type(xs) != tuple:
        xs = tuple(xs);
    return nearest_indices(xs,XS);
382513
def bounding_cylinder(self):
        
        from . import primitives, bounds
        kwargs = bounds.minimum_cylinder(self)
        mincyl = primitives.Cylinder(mutable=False, **kwargs)
        return mincyl