(self)
Context for performing actions on an optimizer (such as optimize) with all stdout discarded.
        Usage example:

        >>> opt = BayesianOptimizer(domain, acquisition, optimizer)
        >>> with opt.silent():
        >>>     # Run without printing anything
        >>>     opt.optimize(fx, n_iter=2)
Context for performing actions on an optimizer (such as optimize) with all stdout discarded.
        Usage example:
Context for performing actions on an optimizer ( such as optimize ) with all stdout discarded . Usage example :
def silent(self):
        """
        Context for performing actions on an optimizer (such as optimize) with all stdout discarded.
        Usage example:

        >>> opt = BayesianOptimizer(domain, acquisition, optimizer)
        >>> with opt.silent():
        >>>     # Run without printing anything
        >>>     opt.optimize(fx, n_iter=2)
        """
        save_stdout = sys.stdout
        sys.stdout = open(os.devnull, 'w')
        yield
        sys.stdout = save_stdout
def silent ( self ) : save_stdout = sys . stdout sys . stdout = open ( os . devnull , 'w' ) yield sys . stdout = save_stdout