diff --git a/src/glum/_glm.py b/src/glum/_glm.py index 9c9fb53d..e490550d 100644 --- a/src/glum/_glm.py +++ b/src/glum/_glm.py @@ -940,7 +940,9 @@ def _set_up_for_fit(self, y: np.ndarray) -> None: elif (self.lower_bounds is None) and (self.upper_bounds is None): if np.all(np.asarray(self.l1_ratio) == 0): self._solver = "irls-ls" - elif getattr(self, "alpha", 1) == 0 and not self.alpha_search: + elif ( + hasattr(self, "alpha") and self.alpha == 0 and not self.alpha_search + ): self._solver = "irls-ls" else: self._solver = "irls-cd"