Gets the max value in the tensor.
770103
public double getMax() {
        double max = s.minValue();
        for (int c = 0; c < this.size(); c++) {
            double val = getValue(c);
            if (s.gte(val, max)) {
                max = val;
            }
        }
        return max;
    }
1349302
def clamp_tensor(tensor, minimum, maximum):
    
    if tensor.is_sparse:
        coalesced_tensor = tensor.coalesce()
        # pylint: disable=protected-access
        coalesced_tensor._values().clamp_(minimum, maximum)
        return coalesced_tensor
    else:
        return tensor.clamp(minimum, maximum)
1370678
def softmax(attrs, inputs, proto_obj):
    """"""
    if 'axis' not in attrs:
        attrs = translation_utils._add_extra_attributes(attrs, {'axis': 1})
    return 'softmax', attrs, inputs
586460
def _max(ctx, *number):
    
    if len(number) == 0:
        raise ValueError("Wrong number of arguments")

    result = conversions.to_decimal(number[0], ctx)
    for arg in number[1:]:
        arg = conversions.to_decimal(arg, ctx)
        if arg > result:
            result = arg
    return result
35192
def GetMaximum(self, expression, cut=None):
        
        if cut:
            self.Draw(expression, cut, 'goff')
        else:
            self.Draw(expression, '', 'goff')
        vals = self.GetV1()
        n = self.GetSelectedRows()
        vals = [vals[i] for i in range(min(n, 10000))]
        return max(vals)
1144883
public Double getMax() {
        String v = input.getElement().getAttribute("max");
        if (v == null || v.isEmpty()) return null;
        return Double.valueOf(v);
    }
125447
def maximum(self, vars_list: List[str]) -> 'TensorFluent':
        '''
        '''
        return self._aggregation_op(tf.reduce_max, self, vars_list)
64497
def get_max_dim(self, obj):
        """"""

        try:
            iter(obj)

        except TypeError:
            return 0

        try:
            for o in obj:
                iter(o)
                break

        except TypeError:
            return 1

        return 2
565840
def softmax(w)
	    e = Numo::NMath.exp(w - (w.max))
	    dist = e / (e.sum)
	    return dist
	end
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;
    }
977649
def max_value(self):
        

        if self._is_completely_masked:
            return np.nan * self._data_unit
        else:
            return np.max(self.values)
1166360
def get_max_value_key(dic):
    """"""
    v = np.array(list(dic.values()))
    k = np.array(list(dic.keys()))

    maxima = np.where(v == np.max(v))[0]
    if len(maxima) == 1:
        return k[maxima[0]]
    else:
        # In order to be consistent, always selects the minimum key
        # (guaranteed to be unique) when there are multiple maximum values.
        return k[maxima[np.argmin(k[maxima])]]
920389
public static int getMaxIndex(DoubleMatrix1D v){
	  	int maxIndex = -1;
	  	double maxValue = -Double.MAX_VALUE;
	  	for(int i=0; i<v.size(); i++){
	  		if(v.getQuick(i)>maxValue){
	  			maxIndex = i;
	  			maxValue = v.getQuick(i); 
	  		}
	  	}
	  	return maxIndex; 
	  }
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))
885941
def _max(self):
        """"""
        return (
            self.range[1] if (self.range and self.range[1] is not None) else
            (max(self.yvals) if self.yvals else None)
        )
1118004
def norm(self) -> bk.BKTensor:
        """"""
        return bk.absolute(bk.inner(self.tensor, self.tensor))
1355048
def max(cls):
        """"""
        max_recid = db.session.query(func.max(cls.recid)).scalar()
        return max_recid if max_recid else 0