Skip to content

Instantly share code, notes, and snippets.

View da-h's full-sized avatar
🐧
btw I use arch

David Hartmann da-h

🐧
btw I use arch
  • Mainz
  • 13:35 (UTC +02:00)
View GitHub Profile
@da-h
da-h / welford.py
Last active March 18, 2019 14:00 — forked from alexalemi/welford.py
Python Welford Algorithm
# adaption of https://gist.github.com/alexalemi/2151722
# by da-h
# minor changes
import numpy as np
class Welford(object):
""" Implements Welford's algorithm for computing a running mean
and standard deviation as described at:
http://www.johndcook.com/standard_deviation.html