Perform update of param_arrays from grad_arrays not on kvstore.
543220
def _update_params(param_arrays, grad_arrays, updater, num_device,
                   kvstore=None, param_names=None):
    """"""
    updates = [[] for _ in range(num_device)]
    for i, pair in enumerate(zip(param_arrays, grad_arrays)):
        arg_list, grad_list = pair
        if grad_list[0] is None:
            continue
        index = i
        if kvstore:
            name = param_names[index]
            # push gradient, priority is negative index
            kvstore.push(name, grad_list, priority=-index)
            # pull back the sum gradients, to the same locations.
            kvstore.pull(name, grad_list, priority=-index)
        for k, p in enumerate(zip(arg_list, grad_list)):
            # faked an index here, to make optimizer create diff
            # state for the same index but on diff devs, TODO(mli)
            # use a better solution later
            w, g = p
            updates[k].append((index*num_device+k, g, w))
    for dev_updates in updates:
        # update params if param_arrays and grad_arrays are not empty
        if dev_updates:
            i, w, g = zip(*dev_updates)
            updater(i, w, g)
751999
def update(self, other_dict):
        """"""
        for key, value in iter_multi_items(other_dict):
            MultiDict.add(self, key, value)
848997
def update_params(self, param_d):
        
        for param in self.paramlst:
            if param.name in param_d:
                value = param_d[param.name]
                setattr(self.obj, param.name, value)
403032
def update(self, other):
    """"""
    if self._pants_workdir != other._pants_workdir:
      raise ValueError('Other ClasspathProducts from a different pants workdir {}'.format(other._pants_workdir))
    for target, products in other._classpaths._products_by_target.items():
      self._classpaths.add_for_target(target, products)
    for target, products in other._excludes._products_by_target.items():
      self._excludes.add_for_target(target, products)
1021443
def reset_params(self):
        """"""
        self.__params = dict([p, None] for p in self.param_names)
        self.set_params(self.param_defaults)
106284
function(data_source) {

		if (Lava.schema.DEBUG && typeof(data_source) != 'object') Lava.t("Wrong argument passed to updateFromSourceObject");

		if (Array.isArray(data_source)) {

			this._updateFromArray(data_source, []);

		} else if (data_source.isCollection) {

			this._updateFromEnumerable(data_source);

		} else {

			this._updateFromObject(data_source.isProperties ? data_source.getProperties() : data_source);

		}

	}
1353318
def _update(self, data):
        """"""
        for k, v in six.iteritems(data):
            new_value = v
            if isinstance(v, dict):
                new_value = type(self)(v)
            elif isinstance(v, list):
                new_value = [(type(self)(e) if isinstance(e, dict) else e)
                             for e in v]
            setattr(self, k, new_value)
244743
def update_deps( self ):
        """"""
        klass = self.__class__

        for name in klass._fields:
            self.update_deps_on_field( name )
        return
964761
def update(self, **kwargs):
    """"""
    for key, value in kwargs.items():
      setattr(self, key, value)
280569
def update(self, other):
        """"""
        for k, v in other.items():
            if k in self._params:
                assert self._params[k] is v, \
                    "Cannot update self with other because they have different " \
                    "Parameters with the same name '%s'"%k

        for k, v in other.items():
            self._params[k] = v
1228437
function () {

    var items = Array.prototype.slice.call(arguments);
    this.source.unshift.apply(this.source, items);
    this._updateInfo();

    // DEPRECATED
    this.emit("insert", items[0], 0);
    this.emit("update", { insert: items });
  }
372415
def _post_processing(kwargs, skip_translate, invalid):  # pylint: disable=unused-argument
    '''
    
    '''
    # If any defaults were not expicitly passed, add them
    for item in DEFAULTS:
        if item not in kwargs:
            kwargs[item] = DEFAULTS[item]
1126369
def updateParams(self, newvalues, update_all=False):
        """"""
        assert all(map(lambda x: x in self.freeparams, newvalues.keys())),\
                "Invalid entry in newvalues: {0}\nfreeparams: {1}".format(
                ', '.join(newvalues.keys()), ', '.join(self.freeparams))

        newvalues_list = [{} for k in range(self.ncats)]

        if update_all or any([param in self.distributionparams for param
                in newvalues.keys()]):
            self._d_distributionparams = {}
            for param in self.distributionparams:
                if param in newvalues:
                    _checkParam(param, newvalues[param], self.PARAMLIMITS,
                            self.PARAMTYPES)
                    setattr(self, param, copy.copy(newvalues[param]))
            self._lambdas = DiscreteGamma(self.alpha_lambda, self.beta_lambda,
                    self.ncats)
            for (k, l) in enumerate(self._lambdas):
                newvalues_list[k][self.distributedparam] = l
        for name in self.freeparams:
            if name not in self.distributionparams:
                if name in newvalues:
                    value = newvalues[name]
                    _checkParam(name, value, self.PARAMLIMITS, self.PARAMTYPES)
                    setattr(self, name, copy.copy(value))
                    for k in range(self.ncats):
                        newvalues_list[k][name] = value
                elif update_all:
                    for k in range(self.ncats):
                        newvalues_list[k][name] = getattr(self, name)

        assert len(newvalues_list) == len(self._models) == self.ncats
        for (k, newvalues_k) in enumerate(newvalues_list):
            self._models[k].updateParams(newvalues_k)

        # check to make sure all models have same parameter values
        for param in self.freeparams:
            if param not in self.distributionparams:
                pvalue = getattr(self, param)
                assert all([scipy.allclose(pvalue, getattr(model, param))
                        for model in self._models]), ("{0}\n{1}".format(
                        pvalue, '\n'.join([str(getattr(model, param))
                        for model in self._models])))
772829
def _update_params(self):
        
        if self.data.get('title'):
            self.params['title'] = self.data.get('title')
        if self.data.get('pageid'):
            self.params['pageid'] = self.data.get('pageid')
        if self.data.get('wikibase'):
            self.params['wikibase'] = self.data.get('wikibase')
694882
def paramsarray(self):
        """"""
        # Return copy of `_paramsarray` because setter checks if changed
        if self._paramsarray is not None:
            return self._paramsarray.copy()
        nparams = len(self._index_to_param)
        self._paramsarray = scipy.ndarray(shape=(nparams,), dtype='float')
        for (i, param) in self._index_to_param.items():
            if isinstance(param, str):
                self._paramsarray[i] = getattr(self.model, param)
            elif isinstance(param, tuple):
                self._paramsarray[i] = getattr(self.model, param[0])[param[1]]
            else:
                raise ValueError("Invalid param type")
        return self._paramsarray.copy()
1242233
protected function updateKeys(){
		if(is_array($this->mixValue)){
			$this->_arrKeys = array_keys($this->mixValue);
		}else{
			$this->_arrKeys = array();
		}
	}
921649
def _update(self, kwargs):
        """"""
        from pygal.util import merge
        dir_self_set = set(dir(self))
        merge(
            self.__dict__,
            dict([(k, v) for (k, v) in kwargs.items()
                  if not k.startswith('_') and k in dir_self_set])
        )