def _fprime(score, x_full, k_params, alpha):
    x_params = x_full[:k_params]
    # The derivative just appends a vector of constants
    return np.append(score(x_params), alpha)
The regularized derivative
dataset/ETHPy150Open statsmodels/statsmodels/statsmodels/base/l1_slsqp.py/_fprime