Skip to content

Commit

Permalink
Adapt import of check_X_y to comply with scikit-learn 1.6 (#96)
Browse files Browse the repository at this point in the history
  • Loading branch information
kklein authored Dec 24, 2024
1 parent 8b371de commit bfaaf5d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion metalearners/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@
import numpy as np
import pandas as pd
import scipy
from sklearn.base import check_array, check_X_y, is_classifier, is_regressor
from sklearn.base import is_classifier, is_regressor
from sklearn.ensemble import (
HistGradientBoostingClassifier,
HistGradientBoostingRegressor,
)
from sklearn.utils import check_array, check_X_y

from metalearners._typing import Matrix, PredictMethod, Vector, _ScikitModel

Expand Down Expand Up @@ -131,6 +132,7 @@ def check_propensity_score(
)

if features is not None:

check_X_y(features, propensity_scores, multi_output=True, **check_kwargs)
else:
check_array(propensity_scores, **check_kwargs)
Expand Down

0 comments on commit bfaaf5d

Please sign in to comment.