Skip to content

Commit 6fc2a37

Browse files
author
Guillaume Lemaitre
committed
change the way to check the version
1 parent e0bf83b commit 6fc2a37

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

imblearn/metrics/tests/test_score_objects.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
geometric_mean_score,
1111
make_index_balanced_accuracy)
1212
# Get the version
13-
(major, minor, _) = sklearn.__version__.split('.')
14-
if int(minor) < 18:
13+
sk_version = sklearn.__version__
14+
if sk_version < '0.18':
1515
from sklearn.cross_validation import train_test_split
1616
from sklearn.grid_search import GridSearchCV
1717
else:

0 commit comments

Comments
 (0)