Like Math.max() except for shorts.
435434
public static Short max(Short a, Short b) {
		return a >= b ? a : b;
	}
68425
private int maxIntegerDigits(double[] values) {
    int digits = 0;
    for(double value : values) {
      digits = Math.max(digits, integerDigits(value));
    }
    return digits;
  }
441280
def _digits(minval, maxval):
    """"""
    if minval == maxval:
        return 3
    else:
        return min(10, max(2, int(1 + abs(np.log10(maxval - minval)))))
265945
public static float max(final float a, final float b, final float c) {
        return Math.max(Math.max(a, b), c);
    }
758350
public static float max(float[] x) {
        float m = Float.NEGATIVE_INFINITY;

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

        return m;
    }
103476
function maxOrMin( args, method ) {
            var m, n,
                i = 0;

            if ( isArray( args[0] ) ) args = args[0];
            m = new BigNumber( args[0] );

            for ( ; ++i < args.length; ) {
                n = new BigNumber( args[i] );

                // If any number is NaN, return NaN.
                if ( !n.s ) {
                    m = n;
                    break;
                } else if ( method.call( m, n ) ) {
                    m = n;
                }
            }

            return m;
        }
688153
function(arr) {
        return {
            min: Math.min.apply(null, arr),
            max: Math.max.apply(null, arr)
        };
    }
742096
function (num, min, max) {
        if (typeof num !== 'number' || num < min) {
            return min;
        }
        if (num === Infinity) {
            return _.isNil(max) ? min : max;
        }

        return num;
    }
1096216
function argnanmax( arr ) {
	if ( !Array.isArray( arr ) ) {
		throw new TypeError( 'argnanmax()::invalid input argument. Must provide an array.' );
	}
	var len = arr.length,
		max = Number.NEGATIVE_INFINITY,
		idx = [],
		val;

	for ( var i = 0; i < len; i++ ) {
		val = arr[ i ];
		if ( typeof val !== 'number' || val !== val ) {
			continue;
		}
		if ( val > max ) {
			max = val;
			idx.length = 0;
			idx.push( i );
		}
		else if ( val === max ) {
			idx.push( i );
		}
	}
	return idx;
}
1012281
def Softmax(x, params, axis=-1, **kwargs):
  """"""
  del params, kwargs
  return np.exp(x - backend.logsumexp(x, axis, keepdims=True))
671951
private static void softmax(double[] prob) {
        double max = Double.NEGATIVE_INFINITY;
        for (int i = 0; i < prob.length; i++) {
            if (prob[i] > max) {
                max = prob[i];
            }
        }

        double Z = 0.0;
        for (int i = 0; i < prob.length; i++) {
            double p = Math.exp(prob[i] - max);
            prob[i] = p;
            Z += p;
        }

        for (int i = 0; i < prob.length; i++) {
            prob[i] /= Z;
        }
    }
1194304
def max(self, axis=None, dtype=None, out=None, keepdims=False):
        
        return self.elem.__array_ufunc__(
            np.maximum, 'reduce', self.elem,
            axis=axis, dtype=dtype, out=(out,), keepdims=keepdims)
982857
def softmax(xs):
    """"""
    ys = xs - np.max(xs)
    exps = np.exp(ys)
    return exps / exps.sum(axis=0)
305402
public static float max(final float a, final float b) {
        if (Float.isNaN(a)) {
            return b;
        } else if (Float.isNaN(b)) {
            return a;
        } else {
            return Math.max(a, b);
        }
    }
10500
function max(input) {
                if (!Array.isArray(input)) {
                    throw new Error('input must be an array');
                }

                if (input.length === 0) {
                    throw new Error('input must not be empty');
                }

                var max = input[0];
                for (var i = 1; i < input.length; i++) {
                    if (input[i] > max) max = input[i];
                }
                return max;
            }
893385
function max(array) {
  var length = array.length;

  if (length === 0) {
    return 0;
  }

  var index = -1;
  var result = array[++index];

  while (++index < length) {
    if (array[index] > result) {
      result = array[index];
    }
  }

  return result;
}
1346307
public float max(float... values) {
        float max = Float.MIN_VALUE;
        for (int i = 0; i < values.length; i++) {
            if (i == 0 || values[i] > max) {
                max = values[i];
            }
        }
        
        return max;
    }