def testContinuousInterface(algo):
 if (not issubclass(algo, bbo.ContinuousOptimizer)):
  return True
 x = algo(sf, xlist2)
 assert isinstance(x.bestEvaluable, ndarray), 'not converted to array'
 try:
  algo(ife1, xa2)
  return 'Failed to throw dimension mismatch error'
 except ValueError:
  pass
 return True

def testContinuousInterface ( algo ) : if ( not issubclass ( algo , bbo . ContinuousOptimizer ) ) : return True x = algo ( sf , xlist2 ) assert isinstance ( x . bestEvaluable , ndarray ) , 'not converted to array' try : algo ( ife1 , xa2 ) return 'Failed to throw dimension mismatch error' except ValueError : pass return True
test the specifics for the interface for continuousoptimizers .