

def test_cvxopt_versus_slsqp(self):
    if has_cvxopt:
        self.alpha = (3.0 * np.array([0, 1, 1, 1.0]))
        res_slsqp = Logit(self.data.endog, self.data.exog).fit_regularized(method='l1', alpha=self.alpha, disp=0, acc=1e-10, maxiter=1000, trim_mode='auto')
        res_cvxopt = Logit(self.data.endog, self.data.exog).fit_regularized(method='l1_cvxopt_cp', alpha=self.alpha, disp=0, abstol=1e-10, trim_mode='auto', auto_trim_tol=0.01, maxiter=1000)
        assert_almost_equal(res_slsqp.params, res_cvxopt.params, DECIMAL_4)
    else:
        raise SkipTest('Skipped test_cvxopt since cvxopt is not available')

dataset/ETHPy150Open statsmodels/statsmodels/statsmodels/discrete/tests/test_discrete.py TestCVXOPT.test_cvxopt_versus_slsqp/original