Skip to content

Commit

Permalink
don't use getattr unnecessarily
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthiasSchmidtblaicherQC committed Jan 30, 2024
1 parent bb155f7 commit f8532b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/glum/_glm.py
Original file line number Diff line number Diff line change
Expand Up @@ -890,9 +890,9 @@ def _convert_from_pandas(
df,
self.feature_dtypes_,
getattr(self, "has_missing_category_", {}),
getattr(self, "cat_missing_method", "fail"),
cat_missing_method_after_alignment,
)
if getattr(self, "cat_missing_method", "fail") == "convert":
if cat_missing_method_after_alignment == "convert":
df = _add_missing_categories(
df=df,
dtypes=self.feature_dtypes_,
Expand Down

0 comments on commit f8532b6

Please sign in to comment.