#NEWLINE# def test_stochastic_local_search( self ) : #NEWLINE# #INDENT# maximizer = StochasticLocalSearch ( self . acquisition_func , self . branin . X_lower , self . branin . X_upper ) #NEWLINE# x = maximizer . maximize ( ) #NEWLINE# assert ( x . shape [ 0 ] == 1 ) #NEWLINE# assert ( x . shape [ 1 ] == self . branin . n_dims ) #NEWLINE# assert np . all ( ( x [ : , 0 ] >= self . branin . X_lower [ 0 ] ) ) #NEWLINE# assert np . all ( ( x [ : , 1 ] >= self . branin . X_lower [ 1 ] ) ) #NEWLINE# assert np . all ( ( x [ : , 0 ] <= self . branin . X_upper [ 0 ] ) ) #NEWLINE# assert np . all ( ( x [ : , 1 ] <= self . branin . X_upper [ 1 ] ) ) #NEWLINE# assert np . all ( ( x < self . branin . X_upper ) )