def gaussian(mu, sigma):
    # This is the gaussian decorator
    # which is a decorator with parameters
    # This means it should return a
    # 'normal' decorated ie twice wrapped...

    def gaussianize(f):

        @wraps(f)
        def gaussianized(*args):
            x = args[0]
            return 1 / (sigma * (2 * math.pi) ** 0.5) * \
                math.exp((2 * sigma ** 2) / (-(x - mu) ** 2))

        gaussianized.mean = mu
        gaussianized.std_dev = sigma
        gaussianized.variance = sigma ** 2
        gaussianized.cdf = make_gaussian_cdf(mu, sigma)
        gaussianized.argspec = get_args(f)
        gaussianized.entropy = types.MethodType(
            lambda x: 0.5 * math.log(2 * math.pi * math.e * x.variance),
            gaussianized)

        return gaussianized
    return gaussianize
dataset/ETHPy150Open eBay/bayesian-belief-networks/bayesian/gaussian_bayesian_network.py/gaussian/swapped operands of `/`