def updateParams(self, newvalues):
for (param, value) in newvalues.items():<EOL><INDENT>if param not in self.model.freeparams:<EOL><INDENT>raise RuntimeError("<STR_LIT>".format(<EOL>param))<EOL><DEDENT><DEDENT>if newvalues:<EOL><INDENT>self.model.updateParams(newvalues)<EOL>self._updateInternals()<EOL>self._paramsarray = None<EOL><DEDENT>
Update model parameters and re-compute likelihoods.

        This method is the **only** acceptable way to update model
        parameters. The likelihood is re-computed as needed
        by this method.

        Args:
            `newvalues` (dict)
                A dictionary keyed by param name and with value as new
                value to set. Each parameter name must either be a
                valid model parameter (in `model.freeparams`).