#NEWLINE# def fun( self , x , * args ) : #NEWLINE# #INDENT# self . nfev += 1 #NEWLINE# i = atleast_2d ( arange ( 30.0 ) ) . T #NEWLINE# a = ( i / 29.0 ) #NEWLINE# j = arange ( 5.0 ) #NEWLINE# k = arange ( 6.0 ) #NEWLINE# t1 = sum ( ( ( ( j + 1 ) * ( a ** j ) ) * self [ 1 : ] ) , axis = 1 ) #NEWLINE# t2 = sum ( ( ( a ** k ) * x ) , axis = 1 ) #NEWLINE# inner = ( ( ( t1 - ( t2 ** 2 ) ) - 1 ) ** 2 ) #NEWLINE# return ( sum ( inner ) + ( x [ 0 ] ** 2 ) )