def updateParams(self, newvalues, update_all=False):
assert all(map(lambda x: x in self.freeparams, newvalues.keys())),"<STR_LIT>".format(<EOL>'<STR_LIT:U+002CU+0020>'.join(newvalues.keys()), '<STR_LIT:U+002CU+0020>'.join(self.freeparams))<EOL>changed = set([]) <EOL>for (name, value) in newvalues.items():<EOL><INDENT>_checkParam(name, value, self.PARAMLIMITS, self.PARAMTYPES)<EOL>if isinstance(value, scipy.ndarray):<EOL><INDENT>if (value != getattr(self, name)).any():<EOL><INDENT>changed.add(name)<EOL>setattr(self, name, value.copy())<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if value != getattr(self, name):<EOL><INDENT>changed.add(name)<EOL>setattr(self, name, copy.copy(value))<EOL><DEDENT><DEDENT><DEDENT>if update_all or changed:<EOL><INDENT>self._cached = {}<EOL><DEDENT>if update_all or (changed and changed != set(['<STR_LIT>'])):<EOL><INDENT>self._update_Pxy()<EOL>self._update_Pxy_diag()<EOL>self._update_dPxy()<EOL>self._update_B()<EOL><DEDENT>
See docs for `Model` abstract base class.