def test_LM_heteroskedastic_demean(self):
        resid = self.res1_restricted.wresid
        n = resid.shape[0]
        X = self.X
        scores = X * resid[:,None]
        scores_demean = scores - scores.mean(0)
        S = n / np.dot(scores_demean.T,scores_demean)
        Sinv = np.linalg.inv(S)
        s = np.mean(scores, 0)
        LMstat = n * np.dot(np.dot(s,Sinv),s.T)
        LMstat_OLS = self.res2_full.compare_lm_test(self.res2_restricted)
        LMstat2 = LMstat_OLS[0]
        assert_almost_equal(LMstat, LMstat2, DECIMAL_7)
dataset/ETHPy150Open statsmodels/statsmodels/statsmodels/regression/tests/test_regression.py/TestLM.test_LM_heteroskedastic_demean/swapped operands of `/`