Skip to content

Commit bee85c0

Browse files
committed
Adapt numerical base transformers to narwhals-returning check_X (#1022)
1 parent 4475691 commit bee85c0

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

feature_engine/_base_transformers/base_numerical.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def _fit_setup(self, X: IntoDataFrame):
6161
"""
6262

6363
# check input dataframe
64-
X = check_X(X)
64+
check_X(X)
6565

6666
# find or check for numerical variables
6767
if self.variables is None:
@@ -114,7 +114,7 @@ def _check_transform_input_and_state(self, X: IntoDataFrame) -> IntoDataFrame:
114114
check_is_fitted(self)
115115

116116
# check that input is a dataframe
117-
X = check_X(X)
117+
check_X(X)
118118

119119
# Check if input data contains same number of columns as dataframe used to fit.
120120
_check_X_matches_training_df(X, self.n_features_in_)

feature_engine/_base_transformers/mixins.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def _fit_from_dict(
9696
The variables in the dictionary.
9797
"""
9898
# check input dataframe
99-
X = check_X(X)
99+
check_X(X)
100100

101101
# find or check for numerical variables
102102
variables = list(user_dict_.keys())

0 commit comments

Comments
 (0)