Skip to content

Commit

Permalink
pch
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcAntoineSchmidtQC committed Feb 19, 2025
1 parent 262a7ea commit 923bbdc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/glum/_glm.py
Original file line number Diff line number Diff line change
Expand Up @@ -2372,8 +2372,7 @@ def _validate_hyperparameters(self) -> None:
if self.alpha_search:
if not isinstance(self.alpha, Iterable) and self.alpha is not None:
raise ValueError(
"`alpha` should be an Iterable or None when `alpha_search`"
" is True"
"`alpha` should be an Iterable or None when `alpha_search` is True"
)
if self.alpha is not None and (
(np.asarray(self.alpha) < 0).any()
Expand All @@ -2383,7 +2382,7 @@ def _validate_hyperparameters(self) -> None:
if not self.alpha_search:
if not np.isscalar(self.alpha) and self.alpha is not None:
raise ValueError(
"`alpha` should be a scalar or None when `alpha_search`" " is False"
"`alpha` should be a scalar or None when `alpha_search` is False"
)
if self.alpha is not None and (
not isinstance(self.alpha, (int, float)) or self.alpha < 0
Expand Down
2 changes: 1 addition & 1 deletion src/glum/_solvers.py
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,7 @@ def _lbfgs_solver(
)
if info["warnflag"] == 1:
warnings.warn(
"lbfgs failed to converge." " Increase the number of iterations.",
"lbfgs failed to converge. Increase the number of iterations.",
ConvergenceWarning,
)
elif info["warnflag"] == 2:
Expand Down

0 comments on commit 923bbdc

Please sign in to comment.