(self, func, x, args=(), basis=None, name=None,
                 plot_cmd=pylab.plot if pylab else None, load=True)
Parameters
        ----------
            `func`
                objective function
            `x`
                point in search space, middle point of the sections
            `args`
                arguments passed to `func`
            `basis`
                evaluated points are ``func(x + locations[j] * basis[i]) for i in len(basis) for j in len(locations)``,
                see `do()`
            `name`
                filename where to save the result
            `plot_cmd`
                command used to plot the data, typically matplotlib pylabs `plot` or `semilogy`
            `load`
                load previous data from file ``str(func) + '.pkl'``
Parameters
        ----------
            `func`
                objective function
            `x`
                point in search space, middle point of the sections
            `args`
                arguments passed to `func`
            `basis`
                evaluated points are ``func(x + locations[j] * basis[i]) for i in len(basis) for j in len(locations)``,
                see `do()`
            `name`
                filename where to save the result
            `plot_cmd`
                command used to plot the data, typically matplotlib pylabs `plot` or `semilogy`
            `load`
                load previous data from file ``str(func) + '.pkl'``
Parameters ---------- func objective function x point in search space middle point of the sections args arguments passed to func basis evaluated points are func ( x + locations [ j ] * basis [ i ] ) for i in len ( basis ) for j in len ( locations ) see do () name filename where to save the result plot_cmd command used to plot the data typically matplotlib pylabs plot or semilogy load load previous data from file str ( func ) + . pkl
def __init__(self, func, x, args=(), basis=None, name=None,
                 plot_cmd=pylab.plot if pylab else None, load=True):
        """
        Parameters
        ----------
            `func`
                objective function
            `x`
                point in search space, middle point of the sections
            `args`
                arguments passed to `func`
            `basis`
                evaluated points are ``func(x + locations[j] * basis[i]) for i in len(basis) for j in len(locations)``,
                see `do()`
            `name`
                filename where to save the result
            `plot_cmd`
                command used to plot the data, typically matplotlib pylabs `plot` or `semilogy`
            `load`
                load previous data from file ``str(func) + '.pkl'``

        """
        self.func = func
        self.args = args
        self.x = x
        self.name = name if name else str(func).replace(' ', '_').replace('>', '').replace('<', '')
        self.plot_cmd = plot_cmd  # or semilogy
        self.basis = np.eye(len(x)) if basis is None else basis

        try:
            self.load()
            if any(self.res['x'] != x):
                self.res = {}
                self.res['x'] = x  # TODO: res['x'] does not look perfect
            else:
                print(self.name + ' loaded')
        except:
            self.res = {}
            self.res['x'] = x
def __init__ ( self , func , x , args = ( ) , basis = None , name = None , plot_cmd = pylab . plot if pylab else None , load = True ) : self . func = func self . args = args self . x = x self . name = name if name else str ( func ) . replace ( ' ' , '_' ) . replace ( '>' , '' ) . replace ( '<' , '' ) self . plot_cmd = plot_cmd # or semilogy self . basis = np . eye ( len ( x ) ) if basis is None else basis try : self . load ( ) if any ( self . res [ 'x' ] != x ) : self . res = { } self . res [ 'x' ] = x # TODO: res['x'] does not look perfect else : print ( self . name + ' loaded' ) except : self . res = { } self . res [ 'x' ] = x