Update |KI1| based on |EQI1| and |TInd|.

        >>> from hydpy.models.lland import *
        >>> parameterstep('1d')
        >>> eqi1(5.0)
        >>> tind.value = 10.0
        >>> derived.ki1.update()
        >>> derived.ki1
        ki1(50.0)
514852
def update(self):
        
        con = self.subpars.pars.control
        self(con.eqi1*con.tind)
481734
def interpolate_where(self, condition):
        
        raise NotImplementedError()
        self[self < 0] = np.nan
        return self.interpolate()
542179
def fit(self, X, *args, **kwargs):
        

        self.constant_value = self._get_constant_value(X)

        if self.constant_value is None:
            if self.unfittable_model:
                self.model = getattr(scipy.stats, self.model_class)(*args, **kwargs)
            else:
                self.model = getattr(scipy.stats, self.model_class)(X, *args, **kwargs)

            for name in self.METHOD_NAMES:
                attribute = getattr(self.__class__, name)
                if isinstance(attribute, str):
                    setattr(self, name, getattr(self.model, attribute))

                elif attribute is None:
                    setattr(self, name, missing_method_scipy_wrapper(lambda x: x))

        else:
            self._replace_constant_methods()

        self.fitted = True
47938
def set_parameter(self, key, value):
        
        for x in self.transformed_structures:
            x.other_parameters[key] = value
1316914
def update(self,iiter,H,Y,eta,loss):
        """"""
        if iiter <= self.niter_trace+1:
            self.H[iiter] = H
            self.Y[iiter] = Y
        elif iiter >self.niter - self.niter_trace + 1:
            self.H[self.ltrace+iiter-self.niter-1] = H
            self.Y[self.ltrace+iiter-self.niter-1] = Y

        self.etas[iiter] = eta
        self.loss[iiter] = loss
        if self.loss[iiter] < self.lmin:
            self.Yh = Y
            self.lmin = self.loss[iiter]
            self.miniter = iiter if not iiter == -1 else self.niter + 1
1140295
def get_and_update(cls, id, **kwargs):
        
        model = cls.get(id)
        for k, v in cls._preprocess_params(kwargs).items():
            setattr(model, k, v)
        cls.session.commit()
        return model
394038
@Override
    public void applyUpdate(StepFunction function, INDArray params, INDArray updates, double alpha) {
        try {
            // nullify given updates first
            Nd4j.getMemoryManager().memset(updates);
            //updates.assign(0.0);

            int cnt = 0;
            while (!messages.get(index.get()).isEmpty()) {
                INDArray compressed = messages.get(index.get()).poll();

                int encoding = compressed.data().getInt(3);
                if (encoding == ThresholdCompression.FLEXIBLE_ENCODING)
                    Nd4j.getExecutioner().thresholdDecode(compressed, updates);
                else if (encoding == ThresholdCompression.BITMAP_ENCODING)
                    Nd4j.getExecutioner().bitmapDecode(compressed, updates);
                else
                    throw new DL4JInvalidConfigException("Unknown compression header received: " + encoding);

                cnt++;
            }

            if (cnt > 0 && isDebug)
                log.info("Local updates to be applied: {}", cnt);

            if (externalSource != null) {
                int ent = 0;
                if (externalSource.hasAnything()) {
                    externalSource.drainTo(updates);

                    cnt++;
                    ent++;
                }

                if (ent > 0 && isDebug)
                    log.info("External updates to be applied: {}", ent);
            }

            synchronize(currentConsumers.get(), true);

            // TODO: average updates? might have sense

            if (cnt > 0)
                function.step(params, updates, alpha);
        } catch (Exception e) {
            throwable.setIfFirst(e);
            throw new RuntimeException(e);
        }
    }
1261365
private void updateThreshold(int i)
    {
        double Fi = fcache[i];
        double F_tilde_i = b_low;
        
        if (I0_b[i] || I2[i])
            F_tilde_i = Fi + epsilon;
        else if (I0_a[i] || I1[i])
            F_tilde_i = Fi - epsilon;
        
        double F_bar_i = b_up;
        if (I0_a[i] || I3[i])
            F_bar_i = Fi - epsilon;
        else if (I0_b[i] || I1[i])
            F_bar_i = Fi + epsilon;
        
        //update the bounds
        
        if (b_low < F_tilde_i)
        {
            b_low = F_tilde_i;
            i_low = i;
        }
        
        if (b_up > F_bar_i)
        {
            b_up = F_bar_i;
            i_up = i;
        }
    }
958678
def add(self, key, value, key_length=0):
        
        if key_length < 1:
            key_length = len(key)
        val = self.add_method(self, key, key_length, value)
        if self.k:
            self._update(key, value)
        return val
565005
def updateIntensities(self, fiContainer, iKey='intensity'):
        
        for fgi in listvalues(self.container):
            intensities = list()
            specfileIds = {i: j for i, j in zip(fgi.specfiles, fgi.featureIds)}
            for specfile in self._matrixTemplate:
                if specfile in specfileIds:
                    fi = fiContainer.getItem(specfile, specfileIds[specfile])
                    intensities.append(getattr(fi, iKey))
                else:
                    intensities.append(None)
            fgi.intensities = intensities
685693
def _update(self):
        """"""

        if self.strains.size and self.strains.size == self.values.size:
            x = np.log(self.strains)
            y = self.values

            if x.size < 4:
                self._interpolater = interp1d(
                    x,
                    y,
                    'linear',
                    bounds_error=False,
                    fill_value=(y[0], y[-1]))
            else:
                self._interpolater = interp1d(
                    x,
                    y,
                    'cubic',
                    bounds_error=False,
                    fill_value=(y[0], y[-1]))
986614
def v1_0to1_1_0dev1(doc, loader, baseuri):  # pylint: disable=unused-argument
    # type: (Any, Loader, Text) -> Tuple[Any, Text]
    """"""

    doc = copy.deepcopy(doc)

    rewrite = {
        "http://commonwl.org/cwltool#WorkReuse": "WorkReuse",
        "http://commonwl.org/cwltool#TimeLimit": "ToolTimeLimit",
        "http://commonwl.org/cwltool#NetworkAccess": "NetworkAccess",
        "http://commonwl.org/cwltool#InplaceUpdateRequirement": "InplaceUpdateRequirement",
        "http://commonwl.org/cwltool#LoadListingRequirement": "LoadListingRequirement",
        "http://commonwl.org/cwltool#WorkReuse": "WorkReuse",
    }
    def rewrite_requirements(t):
        if "requirements" in t:
            for r in t["requirements"]:
                if r["class"] in rewrite:
                    r["class"] = rewrite[r["class"]]
        if "hints" in t:
            for r in t["hints"]:
                if r["class"] in rewrite:
                    r["class"] = rewrite[r["class"]]
        if "steps" in t:
            for s in t["steps"]:
                rewrite_requirements(s)

    def update_secondaryFiles(t):
        if isinstance(t, MutableSequence):
            return [{"pattern": p} for p in t]
        else:
            return t

    def fix_inputBinding(t):
        for i in t["inputs"]:
            if "inputBinding" in i:
                ib = i["inputBinding"]
                for k in list(ib.keys()):
                    if k != "loadContents":
                        _logger.warning(SourceLine(ib, k).makeError("Will ignore field '%s' which is not valid in %s inputBinding" %
                                                                    (k, t["class"])))
                        del ib[k]

    visit_class(doc, ("CommandLineTool","Workflow"), rewrite_requirements)
    visit_class(doc, ("ExpressionTool","Workflow"), fix_inputBinding)
    visit_field(doc, "secondaryFiles", update_secondaryFiles)

    upd = doc
    if isinstance(upd, MutableMapping) and "$graph" in upd:
        upd = upd["$graph"]
    for proc in aslist(upd):
        proc.setdefault("hints", [])
        proc["hints"].insert(0, {"class": "NetworkAccess", "networkAccess": True})
        proc["hints"].insert(0, {"class": "LoadListingRequirement", "loadListing": "deep_listing"})

    return (doc, "v1.1.0-dev1")
416220
def updateD_H(self, x):
        
        self.precompute(x)
        H = zeros((len(x), len(x)))
        Ai = zeros(self.A.shape[0])
        Aj = zeros(Ai.shape)
        for i in range(len(x)):
            Ai = self.A[:, i]
            ti = dot(self.AD, outer(self.R[:, i], Ai)) + dot(outer(Ai, self.R[i, :]), self.ADt)

            for j in range(i, len(x)):
                Aj = self.A[:, j]
                tj = outer(Ai, Aj)
                H[i, j] = (
                    self.E * (self.R[i, j] * tj + self.R[j, i] * tj.T) -
                    ti * (
                        dot(self.AD, outer(self.R[:, j], Aj)) +
                        dot(outer(Aj, self.R[j, :]), self.ADt)
                    )
                ).sum()
                H[j, i] = H[i, j]
        H *= -2
        e = eigvals(H).min()
        H = H + (eye(H.shape[0]) * e)
        return H
1180533
def update(self, sid, **kwargs):
        
        item = self[sid]
        for attribute, value in kwargs.items():
            item[attribute] = value
        self[sid] = item
783510
def update_lambda(self, *args, **kwargs):
        

        """

        if self.restart_strategy == 'greedy':
            return 2

        # Steps 3 and 4 from alg.10.7.
        self._t_prev = self._t_now

        if self.mode == 'regular':
            self._t_now = (self.p_lazy + np.sqrt(self.r_lazy *
                           self._t_prev ** 2 + self.q_lazy)) * 0.5

        elif self.mode == 'CD':
            self._t_now = (self._n + self.a_cd - 1) / self.a_cd
            self._n += 1

        return 1 + (self._t_prev - 1) / self._t_now
1212812
def mu(self, value):
        """"""
        for k in range(self.ncats):
            self._models[k].updateParams({'mu':value})
1048169
def update(self):
        
        con = self.subpars.pars.control
        self(con.eqb*con.tind)