scipy integrate.quad return an incorrect value
问题 i use scipy integrate.quad to calc cdf of normal distribution: def nor(delta, mu, x): return 1 / (math.sqrt(2 * math.pi) * delta) * np.exp(-np.square(x - mu) / (2 * np.square(delta))) delta = 0.1 mu = 0 t = np.arange(4.0, 10.0, 1) nor_int = lambda t: integrate.quad(lambda x: nor(delta, mu, x), -np.inf, t) nor_int_vec = np.vectorize(nor_int) s = nor_int_vec(t) for i in zip(s[0],s[1]): print i while it print as follows: (1.0000000000000002, 1.2506543424265854e-08) (1.9563704110140217e-11, 3