if iterable is not None:
    for datum in iterable:
        self.include(datum)

def include(self, datum):
    self.n += 1
self.delta = datum - self.mean
self.mean += self.delta / self.n
self.M2 += self.delta * (datum - self.mean)
self.variance = self.M2 / (self.n - self.ddof)

@property
def std(self):
    return np.sqrt(self.variance)
Computing Standard Deviation in a stream