Returns the column maximum for a matrix.
320387
public static double[] colMax(double[][] data) {
        double[] x = new double[data[0].length];
        for (int i = 0; i < x.length; i++) {
            x[i] = Double.NEGATIVE_INFINITY;
        }

        for (int i = 0; i < data.length; i++) {
            for (int j = 0; j < x.length; j++) {
                if (x[j] < data[i][j]) {
                    x[j] = data[i][j];
                }
            }
        }

        return x;
    }
1075202
public static double findMaxCol(final int blockLength , final DSubmatrixD1 Y , final int col )
    {
        final int width = Math.min(blockLength,Y.col1-Y.col0);

        final double dataY[] = Y.original.data;

        double max = 0;

        for( int i = Y.row0; i < Y.row1; i += blockLength ) {
            int height = Math.min( blockLength , Y.row1 - i );

            int index = i*Y.original.numCols + height*Y.col0 + col;

            if( i == Y.row0 ) {
                index += width*col;
                for( int k = col; k < height; k++ , index += width ) {
                    double v = Math.abs(dataY[index]);
                    if( v > max ) {
                        max = v;
                    }
                }
            } else {
                for( int k = 0; k < height; k++ , index += width ) {
                    double v = Math.abs(dataY[index]);
                    if( v > max ) {
                        max = v;
                    }
                }
            }
        }

        return max;
    }
531852
public static double elementMaxAbs( DMatrix5 a ) {
        double max = Math.abs(a.a1);
        double tmp = Math.abs(a.a2); if( tmp > max ) max = tmp;
        tmp = Math.abs(a.a2); if( tmp > max ) max = tmp;
        tmp = Math.abs(a.a3); if( tmp > max ) max = tmp;
        tmp = Math.abs(a.a4); if( tmp > max ) max = tmp;
        tmp = Math.abs(a.a5); if( tmp > max ) max = tmp;

        return max;
    }
461916
public int findMax(PairDblInt[] cols) {
	int maxIdx = 0;
	double maxVal = -1.0;
	
	for (int i = 0; i < numLabels; i++) {
	    if (cols[i].first > maxVal) {
		maxVal = cols[i].first;
		maxIdx = i;
	    }
	}
	
	return maxIdx;
    }
490338
public Integer max(String column, String where, String[] args) {
		return db.max(getTableName(), column, where, args);
	}
815062
def columnCount(self, row=None):
        
        if row is not None:
            wholerow = self._segments[row]
            return len(wholerow)
        else:
            column_lengths = [len(x) for x in self._segments]
            return max(column_lengths)
1356293
public int getMaximalColumnWidth(int col)
    {
        int ret = 0;
        int r = 0;
        while (r < getRowCount())
        {
            TableCellBox cell = cells[col][r];
            if (cell != null)
            {
                int max = cell.getMaximalWidth() / cell.getColspan();
                if (max > ret) ret = max;
                r += cell.getRowspan();
            }
            else
                r++;
        }
        return ret;
    }
1266825
public static double elementMaxAbs( DMatrix6 a ) {
        double max = Math.abs(a.a1);
        double tmp = Math.abs(a.a2); if( tmp > max ) max = tmp;
        tmp = Math.abs(a.a2); if( tmp > max ) max = tmp;
        tmp = Math.abs(a.a3); if( tmp > max ) max = tmp;
        tmp = Math.abs(a.a4); if( tmp > max ) max = tmp;
        tmp = Math.abs(a.a5); if( tmp > max ) max = tmp;
        tmp = Math.abs(a.a6); if( tmp > max ) max = tmp;

        return max;
    }
324384
public static double elementMax( DMatrix5 a ) {
        double max = a.a1;
        if( a.a2 > max ) max = a.a2;
        if( a.a3 > max ) max = a.a3;
        if( a.a4 > max ) max = a.a4;
        if( a.a5 > max ) max = a.a5;

        return max;
    }
1185267
public static double elementMax( DMatrixD1 a ) {
        final int size = a.getNumElements();

        double max = a.get(0);
        for( int i = 1; i < size; i++ ) {
            double val = a.get(i);
            if( val >= max ) {
                max = val;
            }
        }

        return max;
    }
1343128
def _longest_val_in_column(self, col):
        
        try:
            # +2 is for implicit separator
            return max([len(x[col]) for x in self.table if x[col]]) + 2
        except KeyError:
            logger.error("there is no column %r", col)
            raise
376307
public function max($column = null)
    {
        $this->prepare();

        if (is_null($column)) {
            $max = max($this->_map);
        } else {
            $max = max(array_column($this->_map, $column));
        }

        return $max;
    }
492372
def _max(self):
        """"""
        return (
            self.range[1] if (self.range and self.range[1] is not None) else
            (max(map(abs, self._values)) if self._values else None)
        )
1309982
def get_max(array):
    
    largest = -np.inf
    for i in array:
        try:
            if i > largest:
                largest = i
        except:
            pass
    if np.isinf(largest):
        raise ValueError("there's no numeric value in array!")
    else:
        return largest
765172
def normalize_matrix(matrix):
  """"""
  abs_matrix = np.abs(matrix.copy())
  return abs_matrix / abs_matrix.max()
189275
private static Vec getColumn(Matrix x)
    {
        Vec t;
        
        for(int i = 0; i < x.cols(); i++)
        {
            t = x.getColumn(i);
            if(t.dot(t) > 0 )
                return t;
        }
        
        throw new ArithmeticException("Matrix is essentially zero");
    }
248763
def max(self, axis=None, skipna=True):
        """"""
        nv.validate_minmax_axis(axis)
        return self._minmax('max')