Skip to content

Commit e4b837c

Browse files
committed
Removed unused imports
1 parent b8be019 commit e4b837c

File tree

17 files changed

+10
-28
lines changed

17 files changed

+10
-28
lines changed

sklearn/cluster/dbscan_.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
from scipy import sparse
1414

1515
from ..base import BaseEstimator, ClusterMixin
16-
from ..metrics import pairwise_distances
1716
from ..utils import check_array, check_consistent_length
1817
from ..utils.fixes import astype
1918
from ..neighbors import NearestNeighbors

sklearn/cluster/hierarchical.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"""
1010
from heapq import heapify, heappop, heappush, heappushpop
1111
import warnings
12-
import sys
1312

1413
import numpy as np
1514
from scipy import sparse

sklearn/covariance/outlier_detection.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#
1313
# License: BSD 3 clause
1414

15-
import warnings
1615
import numpy as np
1716
import scipy as sp
1817
from . import MinCovDet

sklearn/datasets/california_housing.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
# License: BSD 3 clause
2323

2424
from io import BytesIO
25-
import os
2625
from os.path import exists
2726
from os import makedirs
2827
import tarfile

sklearn/feature_selection/tests/test_rfe.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
"""
22
Testing Recursive feature elimination
33
"""
4-
import warnings
54
import numpy as np
65
from numpy.testing import assert_array_almost_equal, assert_array_equal
76
from nose.tools import assert_equal, assert_true
@@ -16,7 +15,6 @@
1615

1716
from sklearn.utils import check_random_state
1817
from sklearn.utils.testing import ignore_warnings
19-
from sklearn.utils.testing import assert_warns_message
2018
from sklearn.utils.testing import assert_greater
2119

2220
from sklearn.metrics import make_scorer

sklearn/mixture/gmm.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
# Fabian Pedregosa <[email protected]>
1010
# Bertrand Thirion <[email protected]>
1111

12-
import warnings
1312
import numpy as np
1413
from scipy import linalg
1514
from time import time

sklearn/mixture/tests/test_gmm.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import unittest
44
import copy
55
import sys
6-
import warnings
76

87
from nose.tools import assert_true
98
import numpy as np

sklearn/model_selection/_split.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
from __future__ import division
1515

1616
import warnings
17-
import inspect
1817
from itertools import chain, combinations
1918
from collections import Iterable
2019
from math import ceil, floor

sklearn/multiclass.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
from .metrics.pairwise import euclidean_distances
4545
from .utils import check_random_state
4646
from .utils.validation import _num_samples
47-
from .utils.validation import check_consistent_length
4847
from .utils.validation import check_is_fitted
4948
from .utils.validation import check_X_y
5049
from .utils.multiclass import (_check_partial_fit_first_call,
@@ -246,7 +245,7 @@ def partial_fit(self, X, y, classes=None):
246245
"method".format(self.estimator))
247246
self.estimators_ = [clone(self.estimator) for _ in range
248247
(self.n_classes_)]
249-
248+
250249
# A sparse LabelBinarizer, with sparse_output=True, has been shown to
251250
# outperform or match a dense label binarizer in all cases and has also
252251
# resulted in less or equal memory consumption in the fit_ovr function
@@ -517,7 +516,7 @@ def partial_fit(self, X, y, classes=None):
517516
self.estimators_ = Parallel(n_jobs=self.n_jobs)(
518517
delayed(_partial_fit_ovo_binary)(
519518
estimator, X, y, self.classes_[i], self.classes_[j])
520-
for estimator, (i, j) in izip(self.estimators_, ((i, j) for i
519+
for estimator, (i, j) in izip(self.estimators_, ((i, j) for i
521520
in range(self.n_classes_) for j in range
522521
(i + 1, self.n_classes_))))
523522
return self

sklearn/multioutput.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616

1717
import numpy as np
1818

19-
from abc import ABCMeta, abstractmethod
20-
from .base import BaseEstimator, clone, MetaEstimatorMixin
19+
from abc import ABCMeta
20+
from .base import BaseEstimator, clone
2121
from .base import RegressorMixin, ClassifierMixin
22-
from .utils import check_array, check_random_state, check_X_y
22+
from .utils import check_array, check_X_y
2323
from .utils.fixes import parallel_helper
2424
from .utils.validation import check_is_fitted, has_fit_parameter
2525
from .externals.joblib import Parallel, delayed

0 commit comments

Comments
 (0)