from numpy import exp def gaus(const, mean, sigma): def func(x): return const*exp(-0.5*((x-mean)/sigma)**2.0) return func