Set attributes with provided values.

        Args:
            parameters(dict): Dictionary containing instance parameters.

        Returns:
            Truncnorm: Instance populated with given parameters.
492541
def from_dict(cls, parameters):
        
        instance = cls()
        instance.fitted = parameters['fitted']
        instance.constant_value = parameters['constant_value']

        if instance.fitted and instance.constant_value is None:
            instance.model = scipy.stats.truncnorm(parameters['a'], parameters['b'])

        return instance
525167
def _reset_param(self, param):
        
        if param not in self._instance.CONFIG_PARAMS:
            raise ValueError("Cannot reset unknown parameter '{}'".format(param))
        setattr(self, param, self._instance.CONFIG_PARAMS[param])
724560
def new_param(name, type, value, start = None, scale = None, unit = None, dataunit = None, comment = None):
	
	elem = Param()
	elem.Name = name
	elem.Type = type
	elem.pcdata = value
	# FIXME:  I have no idea how most of the attributes should be
	# encoded, I don't even know what they're supposed to be.
	if dataunit is not None:
		elem.DataUnit = dataunit
	if scale is not None:
		elem.Scale = scale
	if start is not None:
		elem.Start = start
	if unit is not None:
		elem.Unit = unit
	if comment is not None:
		elem.appendChild(ligolw.Comment())
		elem.childNodes[-1].pcdata = comment
	return elem
695386
def _set_params(self):
        
        deriv0 = np.poly1d(self.eos_params)
        deriv1 = np.polyder(deriv0, 1)
        deriv2 = np.polyder(deriv1, 1)
        deriv3 = np.polyder(deriv2, 1)

        for x in np.roots(deriv1):
            if x > 0 and deriv2(x) > 0:
                v0 = x**(-3./2.)
                break
        else:
            raise EOSError("No minimum could be found")

        derivV2 = 4./9. * x**5. * deriv2(x)
        derivV3 = (-20./9. * x**(13./2.) * deriv2(x) - 8./27. *
                   x**(15./2.) * deriv3(x))
        b0 = derivV2 / x**(3./2.)
        b1 = -1 - x**(-3./2.) * derivV3 / derivV2

        # e0, b0, b1, v0
        self._params = [deriv0(v0**(-2./3.)), b0, b1, v0]
462663
def set_parameters(self,parameters):
        
        
        for key,value in list(parameters.items()):
            if key in self.parameters:
                self.parameters[key] = value
1242688
def set_attributes(self, **kwargs):
        
        kwargs = dict(kwargs)
        for name,value in kwargs.items():
            # Raise AttributeError if param not found
            self.__getattr__(name) 
            # Set attributes
            try: self.setp(name,**value)
            except TypeError:
                try:  self.setp(name,*value)
                except (TypeError,KeyError):  
                    self.__setattr__(name,value)
47938
def set_parameter(self, key, value):
        
        for x in self.transformed_structures:
            x.other_parameters[key] = value
620540
def set_params(self, **params):
        
        items = self.steps
        names, _ = zip(*items)

        keys = list(six.iterkeys(params))

        for name in keys:
            if '__' not in name and name in names:
                # replace an estimator
                self._replace_estimator('steps', name, params.pop(name))

            if callable(params[name]):
                # use a callable or function to set parameters
                params[name] = params[name](params)

            elif params[name] in keys:
                # set one arg from another
                params[name] = params[params[name]]

        BaseEstimator.set_params(self, **params)
        return self
273409
def add_param(param):
    # type: (Param) -> Callable
    
    def inner(o):
        try:
            getattr(o, 'parameters').add(param)
        except AttributeError:
            setattr(o, 'parameters', {param})
        return o
    return inner
228065
def set(self, param, value):
        
        self.raw_dict[param] = value
        self.manifest.set(self.feature_name, param, value)
249229
def set_param(self, name, value):
        
        if name not in self.param_names:
            raise ValueError('No GO-PCA Server parameter named "%s"!' %(param))
        self.__params[name] = value
1324339
def set(self, **args) :
		""
		for k, v in args.items() :
			setattr(self, k, v)
57356
def set_params_value(self, *params):
        
        if len(params) != len(self.parameters):
            raise Exception("parameter error")
        temp = self.parameters
        self.parameters = []
        for i in range(len(params)):
            self.parameters.append(Parameter(temp[i]['name'], temp[i]['type']))
            self.parameters[i].set_value(params[i])
1233478
def reset_parameters(self):
        

        stdv = 1.0 / math.sqrt(self.num_features)
        self.weight.weight.data.uniform_(-stdv, stdv)
        if self.bias is not None:
            self.bias.data.uniform_(-stdv, stdv)
        if self.padding_idx is not None:
            self.weight.weight.data[self.padding_idx].fill_(0)
1238655
def setParameter(self, parameterName, index, parameterValue):
    
    if hasattr(self, parameterName):
      setattr(self, parameterName, parameterValue)
    else:
      raise Exception("Unknown parameter: " + parameterName)
402462
def setAttribute(values, value):
    
    if isinstance(value, int):
        values.add().int32_value = value
    elif isinstance(value, float):
        values.add().double_value = value
    elif isinstance(value, long):
        values.add().int64_value = value
    elif isinstance(value, str):
        values.add().string_value = value
    elif isinstance(value, bool):
        values.add().bool_value = value
    elif isinstance(value, (list, tuple, array.array)):
        for v in value:
            setAttribute(values, v)
    elif isinstance(value, dict):
        for key in value:
            setAttribute(
                values.add().attributes.attr[key].values, value[key])
    else:
        values.add().string_value = str(value)
497514
def CMN(self, params):
        
        Ra, Rb = self.get_two_parameters(self.TWO_PARAMETER_COMMA_SEPARATED, params)

        self.check_arguments(low_registers=(Ra, Rb))

        # CMN Ra, Rb
        def CMN_func():
            self.set_NZCV_flags(self.register[Ra], self.register[Rb],
                                self.register[Ra] + self.register[Rb], 'add')

        return CMN_func