Returns maximum negative value or None.
499745
def max_neg(self):
        ''''''
        if self.__len__() == 0:
            return ArgumentError('empty set has no maximum negative value.')
        if self.contains(0):
            return None
        negative = [interval for interval in self.intervals
                    if interval.right < 0]
        if len(negative) == 0:
            return None
        return numpy.max(list(map(lambda i: i.right, negative)))
158063
def fn_max(self, a, axis=None):
        

        return numpy.nanmax(self._to_ndarray(a), axis=axis)
1238695
def max(self, axis=None, skipna=True, *args, **kwargs):
        
        nv.validate_max(args, kwargs)
        nv.validate_minmax_axis(axis)

        if not len(self):
            return self._na_value

        i8 = self.asi8
        try:
            # quick check
            if len(i8) and self.is_monotonic:
                if i8[-1] != iNaT:
                    return self._box_func(i8[-1])

            if self.hasnans:
                if skipna:
                    max_stamp = self[~self._isnan].asi8.max()
                else:
                    return self._na_value
            else:
                max_stamp = i8.max()
            return self._box_func(max_stamp)
        except ValueError:
            return self._na_value
493517
private void softmax() {
        double max = Double.NEGATIVE_INFINITY;
        for (int i = 0; i < outputLayer.units; i++) {
            if (outputLayer.output[i] > max) {
                max = outputLayer.output[i];
            }
        }

        double sum = 0.0;
        for (int i = 0; i < outputLayer.units; i++) {
            double out = Math.exp(outputLayer.output[i] - max);
            outputLayer.output[i] = out;
            sum += out;
        }

        for (int i = 0; i < outputLayer.units; i++) {
            outputLayer.output[i] /= sum;
        }
    }
1291257
def MaximumLikelihood(self):
        
        prob, val = max((prob, val) for val, prob in self.Items())
        return val
629647
public static double max(double[] x) {
        double m = Double.NEGATIVE_INFINITY;

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

        return m;
    }
1118864
def maxDepth(self, currentDepth=0):
        """"""
        if not any((self.left, self.right)):
            return currentDepth
        result = 0
        for child in (self.left, self.right):
            if child:
                result = max(result, child.maxDepth(currentDepth + 1))
        return result
1359101
def _none_value(self):
        
        if self.out_type == int:
            return 0
        elif self.out_type == float:
            return 0.0
        elif self.out_type == bool:
            return False
        elif self.out_type == six.text_type:
            return u''
714799
def _safe_minmax(values):
    """"""

    # Nan and inf guarded min and max
    isfinite = np.isfinite(values)
    if np.any(isfinite):
        # Only use finite values
        values = values[isfinite]

    minval = np.min(values)
    maxval = np.max(values)

    return minval, maxval
782624
def max(cls, x: 'TensorFluent', y: 'TensorFluent') -> 'TensorFluent':
        '''
        '''
        return cls._binary_op(x, y, tf.maximum, tf.float32)
966182
def check_nonnegative(value):
  """"""
  if isinstance(value, tf.Tensor):
    with tf.control_dependencies([tf.assert_greater_equal(value, 0)]):
      value = tf.identity(value)
  elif value < 0:
    raise ValueError("Value must be non-negative.")
  return value
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)
538818
def _min(self):
        """"""
        return (
            self.range[0] if (self.range and self.range[0] is not None) else
            (min(self.yvals) if self.yvals else None)
        )
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;
        }
    }
1157345
def fromlineno(self):
        
        lineno = super(Arguments, self).fromlineno
        return max(lineno, self.parent.fromlineno or 0)
484765
def nu_max(self, *args):
        
        return 3120.* (self.mass(*args) /
                        (self.radius(*args)**2 * np.sqrt(self.Teff(*args)/5777.)))
1331373
def maximum(self, value):
        
        self._remove_max()
        if value is None:
            return
        self._add_max(val=value)