(self, x)
return sum(x**2) - nconstr
Sphere (squared norm) test objective function constraint to the corner
Sphere (squared norm) test objective function constraint to the corner
Sphere ( squared norm ) test objective function constraint to the corner
def cornersphere(self, x):
        """Sphere (squared norm) test objective function constraint to the corner"""
        nconstr = len(x) - 0
        if any(x[:nconstr] < 1):
            return np.NaN
        return sum(x**2) - nconstr
def cornersphere ( self , x ) : nconstr = len ( x ) - 0 if any ( x [ : nconstr ] < 1 ) : return np . NaN return sum ( x ** 2 ) - nconstr