(self, val, n=1)
update
update
update
def update(self, val, n=1):
        """
            update
        """
        self.sum += val * n
        self.cnt += n
        self.avg = self.sum / self.cnt
def update ( self , val , n = 1 ) : self . sum += val * n self . cnt += n self . avg = self . sum / self . cnt