Skip to content

Commit 3c6b658

Browse files
authored
Merge pull request #5 from awennersteen/main
Update Pandas import to new format
2 parents 7180081 + d44fd88 commit 3c6b658

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

skopt/space/space.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@
55
import numpy as np
66
import yaml
77
from scipy.stats.distributions import randint, rv_discrete, uniform
8-
from sklearn.utils import check_pandas_support, check_random_state
8+
from sklearn.utils import check_random_state
9+
try:
10+
# Syntax from sklearn 1.5.0 onwards
11+
from sklearn.utils._optional_dependencies import check_pandas_support
12+
except ImportError:
13+
from sklearn.utils import check_pandas_support
914

1015
from .transformers import (
1116
CategoricalEncoder,

0 commit comments

Comments
 (0)