def Edeta(deta,x): if deta != 0: g = 0.5*(1+erf(x/deta)) return g else: g = np.zeros(x.shape) g[x >= 0 ] =1 return g