diff --git a/sherpa/astro/xspec/__init__.py b/sherpa/astro/xspec/__init__.py index 5fed743a78..155d8a6213 100644 --- a/sherpa/astro/xspec/__init__.py +++ b/sherpa/astro/xspec/__init__.py @@ -1433,11 +1433,17 @@ def calc(self, p, *args, **kwargs): # - model class # - model name # - parameter list + # - any kwargs # msg = f"{ve}: {self.type}.{self.name}" - for par, val in zip(self.pars, args[0]): + for par, val in zip(self.pars, p): msg += f" {par.name}={val}" + if kwargs: + msg += " KEYWORDS " + for k, v in kwargs.items(): + msg += f"{k}={v}" + raise ValueError(msg) from None # This check is being skipped in the 4.8.0 release as it