def multivariateNormalPdf(z, x, sigma):
    assert len(z.shape) == 1 and len(x.shape) == 1 and len(x) == len(z) and sigma.shape == (len(x), len(z))
    tmp = -0.5 * dot(dot((z - x), inv(sigma)), (z - x))
    res = (1. / power(2.0 * pi, len(z) / 2.)) * (1. / sqrt(det(sigma))) * exp(tmp)
    return res
The pdf of a multivariate normal distribution (not in scipy).
dataset/ETHPy150Open pybrain/pybrain/pybrain/tools/functions.py/multivariateNormalPdf