def logL(self, a, ML=False):

        if ML:
            return (np.log(L.det(self.W)) - (self.r * np.dot(self.W, self.r)).sum()) / 2.
        else:
            if a is None:
                raise ValueError('need fixed effect a for REML contribution to log-likelihood')
            r = self.Y - np.dot(self.X, a)
            return (np.log(L.det(self.W)) - (r * np.dot(self.W, r)).sum()) / 2.
If possible, return what's in the cache
dataset/ETHPy150Open statsmodels/statsmodels/statsmodels/sandbox/panel/mixed.py/Unit.logL--crossover with--dataset/ETHPy150Open ofa/connect/open_connect/media/tests/test_views.py/ImageViewsTest.test_image_view_returns_cache_if_possible