human
Solve the following python programming problem given the following code:
@pytest.mark.skipif(u'not    HAS_SCIPY')
def test_fit_with_bound_constraints_estimate_jacobian():
assistant
#Here is the Python program you requested.

    """Regression test for https://github.com/astropy/astropy/issues/2400
    Checks that bounds constraints are obeyed on a custom model that does not
    define fit_deriv (and thus its Jacobian must be estimated for non-linear
    fitting).
    """
    class MyModel(Fittable1DModel, ):
        a = Parameter(default=1)
        b = Parameter(default=2)
        @staticmethod
        def evaluate(x, a, b):
            return ((a * x) + b)
    m_real = MyModel(a=1.5, b=(-3))
    x = np.arange(100)
    y = m_real(x)
    m = MyModel()
    f = fitting.LevMarLSQFitter()
    fitted_1 = f(m, x, y)
    assert np.allclose(fitted_1.a, 1.5)
    assert np.allclose(fitted_1.b, (-3))
    m2 = MyModel()
    m2.a.bounds = ((-2), 2)
    f2 = fitting.LevMarLSQFitter()
    fitted_2 = f2(m2, x, y)
    assert np.allclose(fitted_1.a, 1.5)
    assert np.allclose(fitted_1.b, (-3))
    assert np.any((f2.fit_info[u'fjac'] != 0))