Merge pull request #5189 from GaelVaroquaux/pr_4779

Pr 4779: Implemented parallelised version of mean_shift and test function
This commit is contained in:
Gael Varoquaux 2015-08-30 19:49:24 +01:00
commit 0bf75367c9
1 changed files with 4 additions and 3 deletions

View File

@ -46,13 +46,14 @@ def test_mean_shift():
n_clusters_ = len(labels_unique)
assert_equal(n_clusters_, n_clusters)
def test_parallel():
ms1 = MeanShift(n_jobs=-1)
ms1 = MeanShift(n_jobs=2)
ms1.fit(X)
ms2 = MeanShift()
ms2.fit(X)
assert_array_equal(ms1.cluster_centers_,ms2.cluster_centers_)
assert_array_equal(ms1.labels_,ms2.labels_)