'logarithm of probability density function
Parameters
x : array_like
can be 1d or 2d, if 2d, then each row is taken as independent
multivariate random vector
Returns
logpdf : float or array
probability density value of each random vector'

def logpdf(self, x):

    x = np.asarray(x)
    df = self.df
    nvars = self.nvars
    x_whitened = self.whiten((x - self.mean))
    llf = ((- nvars) * np_log((df * np_pi)))
    llf -= self.logdetsigma
    llf -= ((df + nvars) * np_log((1 + (np.sum((x_whitened ** 2), (-1)) / df))))
    llf *= 0.5
    llf += (sps_gamln(((df + nvars) / 2.0)) - sps_gamln((df / 2.0)))
    return llf
