Update the values of the scoped variables with the output dictionary of a specific state.

        :param: the dictionary to update the scoped variables with
        :param: the state the output dictionary belongs to
544647
def update_scoped_variables_with_output_dictionary(self, dictionary, state):
        
        for key, value in dictionary.items():
            output_data_port_key = None
            # search for the correct output data port key of the source state
            for o_key, o_port in state.output_data_ports.items():
                if o_port.name == key:
                    output_data_port_key = o_key
                    break
            if output_data_port_key is None:
                if not key == "error":
                    logger.warning("Output variable %s was written during state execution, "
                                   "that has no data port connected to it.", str(key))
            for data_flow_key, data_flow in self.data_flows.items():
                if data_flow.from_key == output_data_port_key and data_flow.from_state == state.state_id:
                    if data_flow.to_state == self.state_id:  # is target of data flow own state id?
                        if data_flow.to_key in self.scoped_variables.keys():  # is target data port scoped?
                            current_scoped_variable = self.scoped_variables[data_flow.to_key]
                            self.scoped_data[str(data_flow.to_key) + self.state_id] = \
                                ScopedData(current_scoped_variable.name, value, type(value), state.state_id,
                                           ScopedVariable, parent=self)
1116054
def update(self, other):
        

        acceptable_models = [ m for m in other._models if set(m.model.keys()) == self.variables ]
        self._models.update(acceptable_models)
        self._eval_exhausted.update(other._eval_exhausted)
        self._max_exhausted.update(other._max_exhausted)
        self._min_exhausted.update(other._min_exhausted)
675047
def update(self, key, value):
        
        if not isinstance(value, dict):
            raise BadValueError(
                'The value {} is incorrect.'
                ' Values should be strings'.format(value))
        if key in self.data:
            v = self.get(key)
            v.update(value)
        else:
            v = value
        self.set(key, v)
1127585
def update(self, *args, **kwargs):
        
        if len(args) > 1:
            raise TypeError("update expected at most 1 arguments, got %d" % len(args))

        for key, value in dict(*args, **kwargs).items():
            self[key] = value
705777
def update(self, *, name=None, position=None, visibility=None):
        

        if name is None and position is None and visibility is None:
            raise ValueError('Provide at least one parameter to update')
        data = {}
        if name:
            data['name'] = name
        if position:
            data['position'] = position
        if visibility:
            data['visibility'] = visibility

        response = self.session.patch(self.build_url(''), data=data)
        if not response:
            return False

        data = response.json()
        self.name = data.get('name', self.name)
        self.position = data.get('position', self.position)
        self.visibility = data.get('visibility', self.visibility)

        return True
290596
def _param_updated(self, pk):
        """"""
        if self._useV2:
            var_id = struct.unpack('<H', pk.data[:2])[0]
        else:
            var_id = pk.data[0]
        element = self.toc.get_element_by_id(var_id)
        if element:
            if self._useV2:
                s = struct.unpack(element.pytype, pk.data[2:])[0]
            else:
                s = struct.unpack(element.pytype, pk.data[1:])[0]
            s = s.__str__()
            complete_name = '%s.%s' % (element.group, element.name)

            # Save the value for synchronous access
            if element.group not in self.values:
                self.values[element.group] = {}
            self.values[element.group][element.name] = s

            logger.debug('Updated parameter [%s]' % complete_name)
            if complete_name in self.param_update_callbacks:
                self.param_update_callbacks[complete_name].call(
                    complete_name, s)
            if element.group in self.group_update_callbacks:
                self.group_update_callbacks[element.group].call(
                    complete_name, s)
            self.all_update_callback.call(complete_name, s)

            # Once all the parameters are updated call the
            # callback for "everything updated" (after all the param
            # updated callbacks)
            if self._check_if_all_updated() and not self.is_updated:
                self.is_updated = True
                self.all_updated.call()
        else:
            logger.debug('Variable id [%d] not found in TOC', var_id)
1203467
def update(self, *args, **kwargs):
        

        dict.update(self, *args, **kwargs)
        self.__dict__.update(*args, **kwargs)
1077225
def update(self, data):
        
        for key, value in data.items():
            setattr(self, key, value)
876067
def update(self, data):
        
        if not data:
            return
        _rk, _dumps = self.get_key, self._dumps
        data = self._client.mset({
            _rk(key): _dumps(value)
            for key, value in data.items()})
155945
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))
        changed = set([]) # contains string names of changed params
        for (name, value) in newvalues.items():
            _checkParam(name, value, self.PARAMLIMITS, self.PARAMTYPES)
            if isinstance(value, scipy.ndarray):
                if (value != getattr(self, name)).any():
                    changed.add(name)
                    setattr(self, name, value.copy())
            else:
                if value != getattr(self, name):
                    changed.add(name)
                    setattr(self, name, copy.copy(value))

        if update_all or changed:
            self._cached = {}

        # The order of the updating below is important.
        # If you change it, you may break either this class
        # **or** classes that inherit from it.
        # Note also that not all attributes need to be updated
        # for all possible parameter changes, but just doing it
        # this way is much simpler and adds negligible cost.
        if update_all or (changed and changed != set(['mu'])):
            self._update_pi_vars()
            self._update_phi()
            self._update_prx()
            self._update_dprx()
            self._update_Qxy()
            self._update_Frxy()
            self._update_Prxy()
            self._update_Prxy_diag()
            self._update_dPrxy()
            self._update_B()
697633
def set_state(self, state):
        
        for k, v in state.items():
            setattr(self, k, v)
948294
def state_invariant_scope(self, state: Sequence[tf.Tensor]):
        '''
        '''
        scope = {}
        scope.update(self.non_fluents_scope())
        scope.update(self.state_scope(state))
        return scope
763305
def update_self(parsed_response)
      instance_variables.each do |iv|
        instance_variable_set(iv, parsed_response[iv.to_s[1..-1].to_sym])
      end
      self
    end
682444
def update(self, prms):
        
        with self.sess.as_default():
            fetches = []
            feeds = {}
            for name, value in six.iteritems(prms):
                assert name in self.name_map
                var = self.name_map[name]
                fetches.append(var.initializer)
                # This is the implementation of `var.load`
                feeds[var.initializer.inputs[1]] = SessionUpdate.relaxed_value_for_var(value, var)
            self.sess.run(fetches, feed_dict=feeds)
944305
def update(self, dictionary=None, **kwargs):
        
        if not dictionary == None: kwargs.update(dictionary)
        for k in list(kwargs.keys()): self[k] = kwargs[k]
814339
def update(self, **kwargs):
        
        for kw in kwargs:
            setattr(self, kw, kwargs[kw])
890743
def update(self, value=None):
        

        # Update self.value
        if value is None:
            value = self._current_value + 1
        self._current_value = value

        # Choose the appropriate environment
        if self._ipython_widget:
            try:
                self._update_ipython_widget(value)
            except RuntimeError:
                pass
        else:
            self._update_console(value)