#NEWLINE# def test_ncg_quadratic( ) : #NEWLINE# #INDENT# obj = Quadratic ( ) #NEWLINE# opt = NonlinearConjugateGradient ( obj . pars , obj . f , obj . fprime ) #NEWLINE# for ( i , info ) in enumerate ( obj ) : #NEWLINE# #INDENT# if ( i > 50 ) : #NEWLINE# #INDENT# break #NEWLINE# #UNINDENT# #UNINDENT# assert obj . solved ( ) , 'did not find solution'