(self, y)
return f if len(f) > 1 else f[0]
Cigtab test objective function
Cigtab test objective function
Cigtab test objective function
def twoaxes(self, y):
        """Cigtab test objective function"""
        X = [y] if np.isscalar(y[0]) else y
        N2 = len(X[0]) // 2
        f = [1e6 * sum(x[0:N2]**2) + sum(x[N2:]**2) for x in X]
        return f if len(f) > 1 else f[0]
def twoaxes ( self , y ) : X = [ y ] if np . isscalar ( y [ 0 ] ) else y N2 = len ( X [ 0 ] ) // 2 f = [ 1e6 * sum ( x [ 0 : N2 ] ** 2 ) + sum ( x [ N2 : ] ** 2 ) for x in X ] return f if len ( f ) > 1 else f [ 0 ]