#NEWLINE# def setup( self , x0 , f0 , func ) : #NEWLINE# #INDENT# Jacobian . setup ( self , x0 , f0 , func ) #NEWLINE# self . last_f = f0 #NEWLINE# self . last_x = x0 #NEWLINE# if ( hasattr ( self , 'alpha' ) and ( self . alpha is None ) ) : #NEWLINE# #INDENT# normf0 = norm ( f0 ) #NEWLINE# if self : #NEWLINE# #INDENT# self . alpha = ( ( 0.5 * max ( norm ( x0 ) , 1 ) ) / normf0 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . alpha = 1.0