Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions conftest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import sys
from distutils.version import LooseVersion
from packaging.version import Version
import sklearn

import pytest
Expand All @@ -13,9 +13,9 @@ def pytest_collection_modifyitems(config, items):
try:
import numpy as np

if LooseVersion(np.__version__) < LooseVersion("1.14") or LooseVersion(
if Version(np.__version__) < Version("1.14") or Version(
sklearn.__version__
) < LooseVersion("0.23.0"):
) < Version("0.23.0"):
reason = (
"doctests are only run for numpy >= 1.14 "
"and scikit-learn >=0.23.0"
Expand Down
1 change: 1 addition & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ dependencies:
- numpy
- scipy
- scikit-learn
- packaging
7 changes: 6 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@
LICENSE = "new BSD"
DOWNLOAD_URL = "https://github.com/scikit-learn-contrib/scikit-learn-extra"
VERSION = __version__ # noqa
INSTALL_REQUIRES = ["numpy>=1.13.3", "scipy>=0.19.1", "scikit-learn>=0.23.0"]
INSTALL_REQUIRES = [
"numpy>=1.13.3",
"scipy>=0.19.1",
"scikit-learn>=0.23.0",
"packaging",
]
CLASSIFIERS = [
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
Expand Down
4 changes: 2 additions & 2 deletions sklearn_extra/cluster/_commonnn.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# License: BSD 3 clause

from distutils.version import LooseVersion
from packaging.version import Version
import warnings

import numpy as np
Expand All @@ -15,7 +15,7 @@
import sklearn
from sklearn.base import BaseEstimator, ClusterMixin

if LooseVersion(sklearn.__version__) < LooseVersion("0.23.0"):
if Version(sklearn.__version__) < Version("0.23.0"):
from sklearn.utils import check_array, check_consistent_length

# In scikit-learn version 0.23.x use
Expand Down