Skip to content

Commit e369c43

Browse files
committed
COSMIT remove unused imports, pep8
1 parent abee93d commit e369c43

File tree

11 files changed

+5
-13
lines changed

11 files changed

+5
-13
lines changed

sklearn/decomposition/dict_learning.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import time
77
import sys
88
import itertools
9-
import warnings
109

1110
from math import sqrt, floor, ceil
1211

sklearn/decomposition/fastica_.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from scipy import linalg
1414

1515
from ..base import BaseEstimator, TransformerMixin
16-
from ..utils import array2d, as_float_array, check_random_state, deprecated
16+
from ..utils import array2d, as_float_array, check_random_state
1717

1818
__all__ = ['fastica', 'FastICA']
1919

sklearn/decomposition/pca.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
# License: BSD Style.
88

99
import numpy as np
10-
import warnings
1110
from scipy import linalg
1211
from math import log
1312

sklearn/decomposition/sparse_pca.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
# Author: Vlad Niculae, Gael Varoquaux, Alexandre Gramfort
33
# License: BSD
44

5-
import warnings
6-
75
import numpy as np
86

97
from ..utils import check_random_state, array2d

sklearn/ensemble/gradient_boosting.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
from abc import ABCMeta, abstractmethod
2626

2727
import sys
28-
import warnings
2928

3029
import numpy as np
3130

sklearn/gaussian_process/gaussian_process.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
from ..base import BaseEstimator, RegressorMixin
1212
from ..metrics.pairwise import manhattan_distances
1313
from ..utils import array2d, check_random_state
14-
from ..utils import deprecated
1514
from . import regression_models as regression
1615
from . import correlation_models as correlation
1716

sklearn/mixture/dpgmm.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#
1111

1212
import numpy as np
13-
import warnings
1413
from scipy.special import digamma as _digamma, gammaln as _gammaln
1514
from scipy import linalg
1615
from scipy.spatial.distance import cdist

sklearn/neighbors/classification.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
NeighborsBase, KNeighborsMixin,\
1919
RadiusNeighborsMixin, SupervisedIntegerMixin
2020
from ..base import ClassifierMixin
21-
from ..utils import atleast2d_or_csr, deprecated
21+
from ..utils import atleast2d_or_csr
2222

2323

2424
class KNeighborsClassifier(NeighborsBase, KNeighborsMixin,

sklearn/neighbors/regression.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
NeighborsBase, KNeighborsMixin, \
1717
RadiusNeighborsMixin, SupervisedFloatMixin
1818
from ..base import RegressorMixin
19-
from ..utils import atleast2d_or_csr, deprecated
20-
19+
from ..utils import atleast2d_or_csr
2120

2221

2322
class KNeighborsRegressor(NeighborsBase, KNeighborsMixin,

sklearn/neighbors/tests/test_neighbors.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,14 +561,15 @@ def test_neighbors_badargs():
561561
nbrs.radius_neighbors_graph,
562562
X, mode='blah')
563563

564+
564565
def test_neighbors_deprecation_arg():
565566
"""Test that passing the deprecated parameter will cause a
566567
warning to be raised, as well as not crash the estimator."""
567568
for cls in (neighbors.KNeighborsClassifier,
568569
neighbors.KNeighborsRegressor):
569570
with warnings.catch_warnings(record=True) as w:
570571
warnings.simplefilter("always")
571-
A = cls(warn_on_equidistant=True)
572+
cls(warn_on_equidistant=True)
572573
assert_equal(len(w), 1)
573574

574575

0 commit comments

Comments
 (0)