#NEWLINE# def logpdf( self , x ) : #NEWLINE# #INDENT# "logarithm of probability density function\n\n        Parameters\n        ----------\n        x : array_like\n            can be 1d or 2d, if 2d, then each row is taken as independent\n            multivariate random vector\n\n        Returns\n        -------\n        logpdf : float or array\n            probability density value of each random vector\n\n\n        this should be made to work with 2d x,\n        with multivariate normal vector in each row and iid across rows\n        doesn't work now because of dot in whiten\n\n        " #NEWLINE# x = np . asarray ( x ) #NEWLINE# x_whitened = self . whiten ( ( x - self . mean ) ) #NEWLINE# SSR = np . sum ( ( x_whitened ** 2 ) , ( - 1 ) ) #NEWLINE# llf = ( - SSR ) #NEWLINE# llf -= ( self . nvars * np . log ( ( 2.0 * np . pi ) ) ) #NEWLINE# llf -= self . logdetsigma #NEWLINE# llf *= 0.5 #NEWLINE# return llf