From 2ec8f91a80a559af1144ea3d4b97669a3449b567 Mon Sep 17 00:00:00 2001 From: Stuart Buckingham Date: Mon, 7 Dec 2020 12:04:41 -0600 Subject: [PATCH] Clean up imports A combination of named imports and module imports were used. Simplified imports so just named imports are used. --- hdbscan/tests/test_hdbscan.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/hdbscan/tests/test_hdbscan.py b/hdbscan/tests/test_hdbscan.py index 05bf6932..770a8904 100644 --- a/hdbscan/tests/test_hdbscan.py +++ b/hdbscan/tests/test_hdbscan.py @@ -25,7 +25,7 @@ membership_vector, all_points_membership_vectors) # from sklearn.cluster.tests.common import generate_clustered_data -from sklearn.datasets import make_blobs +from sklearn.datasets import make_blobs, make_moons from sklearn.utils import shuffle from sklearn.preprocessing import StandardScaler from scipy.stats import mode @@ -34,8 +34,6 @@ from functools import wraps from nose import SkipTest -from sklearn import datasets - import warnings n_clusters = 3 @@ -94,10 +92,10 @@ def run_test(*args, **kwargs): def generate_noisy_data(): - blobs, _ = datasets.make_blobs(n_samples=200, - centers=[(-0.75, 2.25), (1.0, 2.0)], - cluster_std=0.25) - moons, _ = datasets.make_moons(n_samples=200, noise=0.05) + blobs, _ = make_blobs(n_samples=200, + centers=[(-0.75, 2.25), (1.0, 2.0)], + cluster_std=0.25) + moons, _ = make_moons(n_samples=200, noise=0.05) noise = np.random.uniform(-1.0, 3.0, (50, 2)) return np.vstack([blobs, moons, noise])