File tree Expand file tree Collapse file tree 11 files changed +19
-14
lines changed Expand file tree Collapse file tree 11 files changed +19
-14
lines changed Original file line number Diff line number Diff line change 19
19
from ..exceptions import ConvergenceWarning
20
20
from ..utils .validation import check_random_state , check_array
21
21
from ..utils import deprecated
22
- from ..utils .fixes import Sequence
22
+ from ..utils .fixes import _Sequence as Sequence
23
23
from ..linear_model import lars_path
24
24
from ..linear_model import cd_fast
25
25
from ..model_selection import check_cv , cross_val_score
Original file line number Diff line number Diff line change 15
15
from ..preprocessing import MultiLabelBinarizer
16
16
from ..utils import check_array , check_random_state
17
17
from ..utils import shuffle as util_shuffle
18
- from ..utils .fixes import Iterable
18
+ from ..utils .fixes import _Iterable as Iterable
19
19
from ..utils .random import sample_without_replacement
20
20
from ..externals import six
21
21
map = six .moves .map
Original file line number Diff line number Diff line change 12
12
from ..externals import six
13
13
from ..externals .six .moves import xrange
14
14
from ..utils import check_array , tosequence
15
- from ..utils .fixes import Mapping
15
+ from ..utils .fixes import _Mapping as Mapping
16
16
17
17
18
18
def _tosequence (X ):
Original file line number Diff line number Diff line change 33
33
clean_warning_registry , ignore_warnings ,
34
34
SkipTest , assert_raises ,
35
35
assert_allclose_dense_sparse )
36
- from sklearn .utils .fixes import Mapping
36
+ from sklearn .utils .fixes import _Mapping as Mapping
37
37
from collections import defaultdict
38
38
from functools import partial
39
39
import pickle
Original file line number Diff line number Diff line change 39
39
from .cluster import fowlkes_mallows_score
40
40
41
41
from ..utils .multiclass import type_of_target
42
- from ..utils .fixes import Iterable
42
+ from ..utils .fixes import _Iterable as Iterable
43
43
from ..externals import six
44
44
from ..base import is_regressor
45
45
Original file line number Diff line number Diff line change 34
34
from ..utils import check_random_state
35
35
from ..utils .fixes import sp_version
36
36
from ..utils .fixes import MaskedArray
37
- from ..utils .fixes import Mapping , Sequence , Iterable
37
+ from ..utils .fixes import _Mapping as Mapping , _Sequence as Sequence
38
+ from ..utils .fixes import _Iterable as Iterable
38
39
from ..utils .random import sample_without_replacement
39
40
from ..utils .validation import indexable , check_is_fitted
40
41
from ..utils .metaestimators import if_delegate_has_method
Original file line number Diff line number Diff line change 28
28
from ..externals .six import with_metaclass
29
29
from ..externals .six .moves import zip
30
30
from ..utils .fixes import signature , comb
31
- from ..utils .fixes import Iterable
31
+ from ..utils .fixes import _Iterable as Iterable
32
32
from ..base import _pprint
33
33
34
34
__all__ = ['BaseCrossValidator' ,
Original file line number Diff line number Diff line change 14
14
15
15
from sklearn .utils .fixes import sp_version
16
16
from sklearn .utils .fixes import PY3_OR_LATER
17
- from sklearn .utils .fixes import Iterable , Sized
17
+ from sklearn .utils .fixes import _Iterable as Iterable , _Sized as Sized
18
18
from sklearn .utils .testing import assert_equal
19
19
from sklearn .utils .testing import assert_not_equal
20
20
from sklearn .utils .testing import assert_raises
Original file line number Diff line number Diff line change 17
17
from .class_weight import compute_class_weight , compute_sample_weight
18
18
from ..externals .joblib import cpu_count
19
19
from ..exceptions import DataConversionWarning
20
- from ..utils .fixes import Sequence
20
+ from ..utils .fixes import _Sequence as Sequence
21
21
from .deprecation import deprecated
22
22
from .. import get_config
23
23
Original file line number Diff line number Diff line change @@ -301,8 +301,12 @@ def _object_dtype_isnan(X):
301
301
302
302
# To be removed once this fix is included in six
303
303
try :
304
- from collections .abc import Sequence , Iterable # noqa
305
- from collections .abc import Mapping , Sized # noqa
304
+ from collections .abc import Sequence as _Sequence # noqa
305
+ from collections .abc import Iterable as _Iterable # noqa
306
+ from collections .abc import Mapping as _Mapping # noqa
307
+ from collections .abc import Sized as _Sized # noqa
306
308
except ImportError : # python <3.3
307
- from collections import Sequence , Iterable # noqa
308
- from collections import Mapping , Sized # noqa
309
+ from collections import Sequence as _Sequence # noqa
310
+ from collections import Iterable as _Iterable # noqa
311
+ from collections import Mapping as _Mapping # noqa
312
+ from collections import Sized as _Sized # noqa
You can’t perform that action at this time.
0 commit comments