def test_sparse(self):

        import scipy
        v = scipy.__version__.split(".")[1]
        v = int(v)
        if 16 < v:
            return

        cur_dir = os.path.dirname(os.path.abspath(__file__))
        rdir = os.path.join(cur_dir, 'results')
        fname = os.path.join(rdir, 'pastes.csv')

        # Dense
        data = pd.read_csv(fname)
        vcf = {"cask": "0 + cask"}
        model = MixedLM.from_formula("strength ~ 1", groups="batch",
                                     re_formula="1", vc_formula=vcf,
                                     data=data)
        result = model.fit()

        # Sparse
        model2 = MixedLM.from_formula("strength ~ 1", groups="batch",
                                      re_formula="1", vc_formula=vcf,
                                      use_sparse=True, data=data)
        result2 = model2.fit()

        assert_allclose(result.params, result2.params)
        assert_allclose(result.bse, result2.bse)
dataset/ETHPy150Open statsmodels/statsmodels/statsmodels/regression/tests/test_lme.py/TestMixedLM.test_sparse/swapped operands of `<`