(self, value, repeat=1)
RunningMean.add(value, repeat=1)

        Adds the given value to the elements from which we calculate
        the mean and the standard deviation.

        @param value: the element to be added
        @param repeat: number of repeated additions
RunningMean.add(value, repeat=1)
RunningMean . add ( value repeat = 1 )
def add(self, value, repeat=1):
        """RunningMean.add(value, repeat=1)

        Adds the given value to the elements from which we calculate
        the mean and the standard deviation.

        @param value: the element to be added
        @param repeat: number of repeated additions
        """
        repeat = int(repeat)
        self._nitems += repeat
        delta = value - self._mean
        self._mean += repeat * delta / self._nitems
        self._sqdiff += (repeat * delta) * (value - self._mean)
        if self._nitems > 1:
            self._sd = (self._sqdiff / (self._nitems - 1)) ** 0.5
def add ( self , value , repeat = 1 ) : repeat = int ( repeat ) self . _nitems += repeat delta = value - self . _mean self . _mean += repeat * delta / self . _nitems self . _sqdiff += ( repeat * delta ) * ( value - self . _mean ) if self . _nitems > 1 : self . _sd = ( self . _sqdiff / ( self . _nitems - 1 ) ) ** 0.5