Skip to content

Commit

Permalink
FIX sklearn dbscan import
Browse files Browse the repository at this point in the history
Module was renamed in sklearn 0.23
  • Loading branch information
VarIr authored Sep 14, 2023
1 parent 3872ec1 commit 1b410b5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion copac/copac.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 1b410b5

Please sign in to comment.