'Sets the (flattened, log-transformed) non-fixed hyperparameters.
Parameters
theta : array, shape (n_dims,)
The non-fixed, log-transformed hyperparameters of the kernel'

@theta.setter
def theta(self, theta):

    params = self.get_params()
    i = 0
    for hyperparameter in self.hyperparameters:
        if hyperparameter.fixed:
            continue
        if (hyperparameter.n_elements > 1):
            params[hyperparameter.name] = np.exp(theta[i:(i + hyperparameter.n_elements)])
            i += hyperparameter.n_elements
        else:
            params[hyperparameter.name] = np.exp(theta[i])
            i += 1
    if (i != len(theta)):
        raise ValueError(('theta    has    not    the    correct    number    of    entries.    Should    be    %d;    given    are    %d' % (i, len(theta))))
    self.set_params(**params)
