8000 BUG fix pip3 ubuntu update by suffixing file (#15928) · scikit-learn/scikit-learn@a5542e9 · GitHub
[go: up one dir, main page]

Skip to content

Commit a5542e9

Browse files
glemaitrethomasjpfan
authored andcommitted
BUG fix pip3 ubuntu update by suffixing file (#15928)
1 parent 613a333 commit a5542e9

File tree

7 files changed

+12
-10
lines changed

7 files changed

+12
-10
lines changed

sklearn/_build_utils/deprecated_modules.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@
133133
'sklearn.datasets', 'make_classification'),
134134
('_species_distributions', 'sklearn.datasets.species_distributions',
135135
'sklearn.datasets', 'fetch_species_distributions'),
136-
('_svmlight_format', 'sklearn.datasets.svmlight_format',
136+
('_svmlight_format_io', 'sklearn.datasets.svmlight_format',
137137
'sklearn.datasets', 'load_svmlight_file'),
138138
('_twenty_newsgroups', 'sklearn.datasets.twenty_newsgroups',
139139
'sklearn.datasets', 'strip_newsgroup_header'),

sklearn/datasets/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@
4242
from ._samples_generator import make_gaussian_quantiles
4343
from ._samples_generator import make_biclusters
4444
from ._samples_generator import make_checkerboard
45-
from ._svmlight_format import load_svmlight_file
46-
from ._svmlight_format import load_svmlight_files
47-
from ._svmlight_format import dump_svmlight_file
45+
from ._svmlight_format_io import load_svmlight_file
46+
from ._svmlight_format_io import load_svmlight_files
47+
from ._svmlight_format_io import dump_svmlight_file
4848
from ._olivetti_faces import fetch_olivetti_faces
4949
from ._species_distributions import fetch_species_distributions
5050
from ._california_housing import fetch_california_housing

sklearn/datasets/_rcv1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
from ._base import _fetch_remote
2424
from ._base import RemoteFileMetadata
2525
from ._base import _refresh_cache
26-
from ._svmlight_format import load_svmlight_files
26+
from ._svmlight_format_io import load_svmlight_files
2727
from ..utils import shuffle as shuffle_
2828
from ..utils import Bunch
2929

sklearn/datasets/_svmlight_format.py renamed to sklearn/datasets/_svmlight_format_io.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,8 +453,10 @@ def dump_svmlight_file(X, y, f, zero_based=True, comment=None, query_id=None,
453453

454454
Xval = check_array(X, accept_sparse='csr')
455455
if Xval.shape[0] != yval.shape[0]:
456-
raise ValueError("X.shape[0] and y.shape[0] should be the same, got"
457-
" %r and %r instead." % (Xval.shape[0], yval.shape[0]))
456+
raise ValueError(
457+
"X.shape[0] and y.shape[0] should be the same, got"
458+
" %r and %r instead." % (Xval.shape[0], yval.shape[0])
459+
)
458460

459461
# We had some issues with CSR matrices with unsorted indices (e.g. #1501),
460462
# so sort them here, but first make sure we don't modify the user's X.

sklearn/tests/test_common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ def test_import_all_consistency():
179179
for modname in submods + ['sklearn']:
180180
if ".tests." in modname:
181181
continue
182-
if IS_PYPY and ('_svmlight_format' in modname or
182+
if IS_PYPY and ('_svmlight_format_io' in modname or
183183
'feature_extraction._hashing_fast' in modname):
184184
continue
185185
package = __import__(modname, fromlist="dummy")

sklearn/tests/test_docstring_parameters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def test_tabs():
140140
for importer, modname, ispkg in walk_packages(sklearn.__path__,
141141
prefix='sklearn.'):
142142

143-
if IS_PYPY and ('_svmlight_format' in modname or
143+
if IS_PYPY and ('_svmlight_format_io' in modname or
144144
'feature_extraction._hashing_fast' in modname):
145145
continue
146146

sklearn/utils/_testing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ def is_abstract(c):
466466
path=path, prefix='sklearn.', onerror=lambda x: None):
467467
if ".tests." in modname or "externals" in modname:
468468
continue
469-
if IS_PYPY and ('_svmlight_format' in modname or
469+
if IS_PYPY and ('_svmlight_format_io' in modname or
470470
'feature_extraction._hashing_fast' in modname):
471471
continue
472472
# Ignore deprecation warnings triggered at import time.

0 commit comments

Comments
 (0)
0