#NEWLINE# def test_tnc2( self ) : #NEWLINE# #INDENT# ( fg , x , bounds ) = ( self . fg1 , [ ( - 2 ) , 1 ] , ( [ ( - np . inf ) , None ] , [ 1.5 , None ] ) ) #NEWLINE# xopt = [ ( - 1.2210262419616387 ) , 1.5 ] #NEWLINE# ( x , nf , rc ) = optimize . fmin_tnc ( fg , x , bounds = bounds , messages = optimize . tnc . MSG_NONE , maxfun = 200 ) #NEWLINE# assert_allclose ( self . f1 ( x ) , self . f1 ( xopt ) , atol = 1e-08 , err_msg = ( 'TNC failed with status: ' + optimize . tnc . RCSTRINGS [ rc ] ) )