コード例 #1
0
def lognormcdf(x, mu, tau):
    """Log-normal cumulative density function"""
    x = np.atleast_1d(x)
    return np.array([0.5*(1-flib.derf(-(np.sqrt(tau/2))*(np.log(y)-mu))) for y in x])
コード例 #2
0
def normcdf(x):
    """Normal cumulative density function."""
    x = np.atleast_1d(x)
    return np.array([.5*(1+flib.derf(y/sqrt(2))) for y in x])