Skip to content

Commit 2a67a10

Browse files
committed
mypy happy?
1 parent 31490ce commit 2a67a10

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

pyfixest/estimation/collinearity.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,12 @@ def drop_multicollinear_variables(
197197
collin_vars.extend(chol_vars)
198198
collin_index.extend(chol_idx)
199199

200-
if has_fixef and collin_tol_var > 0 and X_raw_sumsq is not None and X_demeaned.shape[1] > 0:
200+
if (
201+
has_fixef
202+
and collin_tol_var > 0
203+
and X_raw_sumsq is not None
204+
and X_demeaned.shape[1] > 0
205+
):
201206
if chol_idx:
202207
X_raw_sumsq = np.delete(X_raw_sumsq, chol_idx)
203208
(X_demeaned, coefnames, var_vars, var_idx) = _drop_multicollinear_variables_var(

pyfixest/estimation/feols_compressed_.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ def __init__(
9393
fixef_maxiter: int,
9494
lookup_demeaned_data: dict[str, pd.DataFrame],
9595
solver: SolverOptions = "np.linalg.solve",
96+
collin_tol_var: Optional[float] = None,
9697
demeaner_backend: DemeanerBackendOptions = "numba",
9798
store_data: bool = True,
9899
copy_data: bool = True,
@@ -116,6 +117,7 @@ def __init__(
116117
fixef_maxiter,
117118
lookup_demeaned_data,
118119
solver,
120+
collin_tol_var,
119121
demeaner_backend,
120122
store_data,
121123
copy_data,

0 commit comments

Comments
 (0)