Skip to content

Commit

Permalink
Avoid unnecessary work
Browse files Browse the repository at this point in the history
  • Loading branch information
stanmart committed Jan 25, 2024
1 parent 099f362 commit 056bf68
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/glum/_glm.py
Original file line number Diff line number Diff line change
Expand Up @@ -2711,7 +2711,8 @@ def _set_up_and_check_fit_args(
self.feature_dtypes_ = X.dtypes.to_dict()
self.has_missing_category_ = {
col: (self.cat_missing_method == "convert") and X[col].isna().any()
for col in self.feature_dtypes_.keys()
for col, dtype in self.feature_dtypes_.items()
if isinstance(dtype, pd.CategoricalDtype)
}

if any(X.dtypes == "category"):
Expand Down

0 comments on commit 056bf68

Please sign in to comment.