diff --git a/copac/copac.py b/copac/copac.py index 6261099..9dd737d 100644 --- a/copac/copac.py +++ b/copac/copac.py @@ -16,7 +16,10 @@ from scipy.spatial.distance import squareform from sklearn.base import BaseEstimator, ClusterMixin -from sklearn.cluster.dbscan_ import dbscan +try: # for sklearn < 0.23 + from sklearn.cluster.dbscan_ import dbscan +except: # for sklearn >= 0.23 + from sklearn.cluster._dbscan import dbscan from sklearn.neighbors import NearestNeighbors from sklearn.utils import check_array