Skip to content

Commit

Permalink
Merge sherpa#2164 (DougBurke) - XSPEC: fix up error message
Browse files Browse the repository at this point in the history
XSPEC: fix up error message
  • Loading branch information
wmclaugh authored Oct 23, 2024
2 parents 799a36f + 507cbd6 commit 141ae8b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion sherpa/astro/xspec/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 141ae8b

Please sign in to comment.