'see class `CMAEvolutionStrategy`'

def __init__(self, x0, sigma0, inopts={}):

    self.inputargs = dict(locals())
    del self.inputargs['self']
    self.inopts = inopts
    opts = Options(inopts).complement()
    if (opts['noise_handling'] and eval(opts['noise_handling'])):
        raise ValueError('noise_handling    not    available    with    class    CMAEvolutionStrategy,    use    function    fmin')
    if (opts['restarts'] and eval(opts['restarts'])):
        raise ValueError('restarts    not    available    with    class    CMAEvolutionStrategy,    use    function    fmin')
    if (x0 == str(x0)):
        x0 = eval(x0)
    self.mean = array(x0)
    if (self.mean.ndim == 2):
        print((('WARNING:    input    x0    should    be    a    list    or    1-D    array,    trying    to    flatten    ' + str(self.mean.shape)) + '-array'))
        if (self.mean.shape[0] == 1):
            self.mean = self.mean[0]
        elif (self.mean.shape[1] == 1):
            self.mean = array([x[0] for x in self.mean])
    if (self.mean.ndim != 1):
        raise _Error('x0    must    be    1-D    array')
    if (len(self.mean) <= 1):
        raise _Error('optimization    in    1-D    is    not    supported    (code    was    never    tested)')
    self.N = self.mean.shape[0]
    N = self.N
    self.mean.resize(N)
    self.x0 = self.mean
    self.mean = self.x0.copy()
    self.sigma0 = sigma0
    if isinstance(sigma0, str):
        self.sigma0 = eval(sigma0)
    if ((np.size(self.sigma0) != 1) or np.shape(self.sigma0)):
        raise _Error('input    argument    sigma0    must    be    (or    evaluate    to)    a    scalar')
    self.sigma = self.sigma0
    opts.evalall(locals())
    self.opts = opts
    self.randn = opts['randn']
    self.gp = GenoPheno(N, opts['scaling_of_variables'], opts['typical_x'], opts['bounds'], opts['fixed_variables'], opts['transformation'])
    self.boundPenalty = BoundPenalty(self.gp.bounds)
    s = self.gp.geno(self.mean)
    self.mean = self.gp.geno(self.mean, bounds=self.gp.bounds)
    self.N = len(self.mean)
    N = self.N
    if (self.mean != s).any():
        print('WARNING:    initial    solution    is    out    of    the    domain    boundaries:')
        print(('        x0            =    ' + str(self.inputargs['x0'])))
        print(('        ldom    =    ' + str(self.gp.bounds[0])))
        print(('        udom    =    ' + str(self.gp.bounds[1])))
    self.fmean = np.NaN
    self.fmean_noise_free = 0.0
    self.sp = CMAParameters(N, opts)
    self.sp0 = self.sp
    self.countiter = 0
    self.countevals = (max((0, opts['verb_append'])) if (type(opts['verb_append']) is not bool) else 0)
    self.ps = np.zeros(N)
    self.pc = np.zeros(N)
    stds = np.ones(N)
    self.sigma_vec = (np.ones(N) if np.isfinite(self.sp.dampsvec) else 1)
    if np.all(self.opts['CMA_teststds']):
        stds = self.opts['CMA_teststds']
        if (np.size(stds) != N):
            raise _Error(('CMA_teststds    option    must    have    dimension    =    ' + str(N)))
    if self.opts['CMA_diagonal']:
        self.B = array(1)
        self.C = (stds ** 2)
        self.dC = self.C
    else:
        self.B = np.eye(N)
        self.C = np.diag(((stds ** 2) * exp((1e-06 * (np.random.rand(N) - 0.5)))))
        self.dC = np.diag(self.C)
        self.Zneg = np.zeros((N, N))
    self.D = stds
    self.flgtelldone = True
    self.itereigenupdated = self.countiter
    self.noiseS = 0
    self.hsiglist = []
    if (not opts['seed']):
        np.random.seed()
        six_decimals = (time.time() - (1000000.0 * (time.time() // 1000000.0)))
        opts['seed'] = (((100000.0 * np.random.rand()) + six_decimals) + (100000.0 * (time.time() % 1)))
    opts['seed'] = int(opts['seed'])
    np.random.seed(opts['seed'])
    self.sent_solutions = SolutionDict()
    self.best = BestSolution()
    out = {}
    out['best'] = self.best
    out['termination'] = {}
    self.out = out
    self.const = BlancClass()
    self.const.chiN = ((N ** 0.5) * ((1 - (1.0 / (4.0 * N))) + (1.0 / (21.0 * (N ** 2)))))
    self.stopdict = CMAStopDict()
    self.callbackstop = 0
    self.fit = BlancClass()
    self.fit.fit = []
    self.fit.hist = []
    self.fit.histbest = []
    self.fit.histmedian = []
    self.more_to_write = []
    if (opts['verb_disp'] > 0):
        sweighted = ('_w' if (self.sp.mu > 1) else '')
        smirr = (('mirr%d' % self.sp.lam_mirr) if self.sp.lam_mirr else '')
        print(((((((('(%d' % self.sp.mu) + sweighted) + (',%d' % self.sp.popsize)) + smirr) + ')-CMA-ES') + ('    (mu_w=%2.1f,w_1=%d%%)' % (self.sp.mueff, int((100 * self.sp.weights[0]))))) + ('    in    dimension    %d    (seed=%d,    %s)' % (N, opts['seed'], time.asctime()))))
        if (opts['CMA_diagonal'] and self.sp.CMA_on):
            s = ''
            if (opts['CMA_diagonal'] is not True):
                s = '    for    '
                if (opts['CMA_diagonal'] < np.inf):
                    s += str(int(opts['CMA_diagonal']))
                else:
                    s += str(np.floor(opts['CMA_diagonal']))
                s += '    iterations'
                s += (('    (1/ccov=' + str(round((1.0 / (self.sp.c1 + self.sp.cmu))))) + ')')
            print(('            Covariance    matrix    is    diagonal' + s))
