Skip to content

Commit d829c63

Browse files
committed
Use a positional argument for the cachedir/location to support old and new joblib
1 parent 379d523 commit d829c63

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

docs/basic_hdbscan.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ want do some method chaining.
146146
.. parsed-literal::
147147
148148
HDBSCAN(algorithm='best', alpha=1.0, approx_min_span_tree=True,
149-
gen_min_span_tree=False, leaf_size=40, memory=Memory(cachedir=None),
149+
gen_min_span_tree=False, leaf_size=40, memory=Memory(None),
150150
metric='euclidean', min_cluster_size=5, min_samples=None, p=None)
151151
152152

docs/how_hdbscan_works.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ library <https://github.com/scikit-learn-contrib/hdbscan>`__ and get to work.
7171
.. parsed-literal::
7272
7373
HDBSCAN(algorithm='best', alpha=1.0, approx_min_span_tree=True,
74-
gen_min_span_tree=True, leaf_size=40, memory=Memory(cachedir=None),
74+
gen_min_span_tree=True, leaf_size=40, memory=Memory(None),
7575
metric='euclidean', min_cluster_size=5, min_samples=None, p=None)
7676
7777

hdbscan/hdbscan_.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ def hdbscan(
506506
p=2,
507507
leaf_size=40,
508508
algorithm="best",
509-
memory=Memory(cachedir=None, verbose=0),
509+
memory=Memory(None, verbose=0),
510510
approx_min_span_tree=True,
511511
gen_min_span_tree=False,
512512
core_dist_n_jobs=4,
@@ -726,7 +726,7 @@ def hdbscan(
726726

727727
# Python 2 and 3 compliant string_type checking
728728
if isinstance(memory, str):
729-
memory = Memory(cachedir=memory, verbose=0)
729+
memory = Memory(memory, verbose=0)
730730

731731
size = X.shape[0]
732732
min_samples = min(size - 1, min_samples)
@@ -1093,7 +1093,7 @@ def __init__(
10931093
p=None,
10941094
algorithm="best",
10951095
leaf_size=40,
1096-
memory=Memory(cachedir=None, verbose=0),
1096+
memory=Memory(None, verbose=0),
10971097
approx_min_span_tree=True,
10981098
gen_min_span_tree=False,
10991099
core_dist_n_jobs=4,

hdbscan/robust_single_linkage_.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def _rsl_boruvka_balltree(X, k=5, alpha=1.0,
135135

136136
def robust_single_linkage(X, cut, k=5, alpha=1.4142135623730951,
137137
gamma=5, metric='euclidean', algorithm='best',
138-
memory=Memory(cachedir=None, verbose=0), leaf_size=40,
138+
memory=Memory(None, verbose=0), leaf_size=40,
139139
core_dist_n_jobs=4, **kwargs):
140140
"""Perform robust single linkage clustering from a vector array
141141
or distance matrix.
@@ -239,7 +239,7 @@ def robust_single_linkage(X, cut, k=5, alpha=1.4142135623730951,
239239

240240
X = check_array(X, accept_sparse='csr')
241241
if isinstance(memory, str):
242-
memory = Memory(cachedir=memory, verbose=0)
242+
memory = Memory(memory, verbose=0)
243243

244244
if algorithm != 'best':
245245
if algorithm == 'generic':

0 commit comments

Comments
 (0)