Skip to content

Commit

Permalink
Apply Alex's suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewfeickert committed Dec 7, 2021
1 parent b895617 commit e36109f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/pyhf/pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ def expected_data(self, pars, return_by_sample=False):
# Verify parameter shapes
if pars.shape[-1] != self.config.npars:
raise exceptions.InvalidPdfParameters(
f"eval failed as pars has len {pars.shape[-1]} but {self.config.npars} was expected"
f"Evaluation failed as parameters have length {pars.shape[-1]} but model requires {self.config.npars}."
)

deltas, factors = self._modifications(pars)
Expand Down Expand Up @@ -715,7 +715,7 @@ def expected_auxdata(self, pars):
# Verify parameter shapes
if pars.shape[-1] != self.config.npars:
raise exceptions.InvalidPdfParameters(
f"eval failed as pars has len {pars.shape[-1]} but {self.config.npars} was expected"
f"Evaluation failed as parameters have length {pars.shape[-1]} but model requires {self.config.npars}."
)

return self.make_pdf(pars)[1].expected_data()
Expand Down Expand Up @@ -744,7 +744,7 @@ def expected_actualdata(self, pars):
# Verify parameter shapes
if pars.shape[-1] != self.config.npars:
raise exceptions.InvalidPdfParameters(
f"eval failed as pars has len {pars.shape[-1]} but {self.config.npars} was expected"
f"Evaluation failed as parameters have length {pars.shape[-1]} but model requires {self.config.npars}."
)

return self.make_pdf(pars)[0].expected_data()
Expand All @@ -765,7 +765,7 @@ def expected_data(self, pars, include_auxdata=True):
# Verify parameter shapes
if pars.shape[-1] != self.config.npars:
raise exceptions.InvalidPdfParameters(
f"eval failed as pars has len {pars.shape[-1]} but {self.config.npars} was expected"
f"Evaluation failed as parameters have length {pars.shape[-1]} but model requires {self.config.npars}."
)

if not include_auxdata:
Expand Down

0 comments on commit e36109f

Please sign in to comment.