#NEWLINE# def test_fixed_constraints( self ) : #NEWLINE# #INDENT# f = SimpleAstropyGaussianFitter ( amplitude = 1.5 , mean = 0 , stddev = 1 ) #NEWLINE# x = np . linspace ( ( - 5 ) , 5 , 10 ) #NEWLINE# y = np . exp ( ( ( - ( x ** 2 ) ) / 2 ) ) #NEWLINE# f . set_constraint ( 'amplitude' , fixed = True ) #NEWLINE# ( model , fitter ) = f . build_and_fit ( x , y ) #NEWLINE# np . testing . assert_almost_equal ( model . amplitude . value , 1.5 )