Skip to content

BUG fix pip3 ubuntu update by suffixing file #15928

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sklearn/_build_utils/deprecated_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
'sklearn.datasets', 'make_classification'),
('_species_distributions', 'sklearn.datasets.species_distributions',
'sklearn.datasets', 'fetch_species_distributions'),
('_svmlight_format', 'sklearn.datasets.svmlight_format',
('_svmlight_format_io', 'sklearn.datasets.svmlight_format',
'sklearn.datasets', 'load_svmlight_file'),
('_twenty_newsgroups', 'sklearn.datasets.twenty_newsgroups',
'sklearn.datasets', 'strip_newsgroup_header'),
Expand Down
6 changes: 3 additions & 3 deletions sklearn/datasets/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@
from ._samples_generator import make_gaussian_quantiles
from ._samples_generator import make_biclusters
from ._samples_generator import make_checkerboard
from ._svmlight_format import load_svmlight_file
from ._svmlight_format import load_svmlight_files
from ._svmlight_format import dump_svmlight_file
from ._svmlight_format_io import load_svmlight_file
from ._svmlight_format_io import load_svmlight_files
from ._svmlight_format_io import dump_svmlight_file
from ._olivetti_faces import fetch_olivetti_faces
from ._species_distributions import fetch_species_distributions
from ._california_housing import fetch_california_housing
Expand Down
2 changes: 1 addition & 1 deletion sklearn/datasets/_rcv1.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from ._base import _fetch_remote
from ._base import RemoteFileMetadata
from ._base import _refresh_cache
from ._svmlight_format import load_svmlight_files
from ._svmlight_format_io import load_svmlight_files
from ..utils import shuffle as shuffle_
from ..utils import Bunch

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -453,8 +453,10 @@ def dump_svmlight_file(X, y, f, zero_based=True, comment=None, query_id=None,

Xval = check_array(X, accept_sparse='csr')
if Xval.shape[0] != yval.shape[0]:
raise ValueError("X.shape[0] and y.shape[0] should be the same, got"
" %r and %r instead." % (Xval.shape[0], yval.shape[0]))
raise ValueError(
"X.shape[0] and y.shape[0] should be the same, got"
" %r and %r instead." % (Xval.shape[0], yval.shape[0])
)

# We had some issues with CSR matrices with unsorted indices (e.g. #1501),
# so sort them here, but first make sure we don't modify the user's X.
Expand Down
2 changes: 1 addition & 1 deletion sklearn/tests/test_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def test_import_all_consistency():
for modname in submods + ['sklearn']:
if ".tests." in modname:
continue
if IS_PYPY and ('_svmlight_format' in modname or
if IS_PYPY and ('_svmlight_format_io' in modname or
'feature_extraction._hashing_fast' in modname):
continue
package = __import__(modname, fromlist="dummy")
Expand Down
2 changes: 1 addition & 1 deletion sklearn/tests/test_docstring_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def test_tabs():
for importer, modname, ispkg in walk_packages(sklearn.__path__,
prefix='sklearn.'):

if IS_PYPY and ('_svmlight_format' in modname or
if IS_PYPY and ('_svmlight_format_io' in modname or
'feature_extraction._hashing_fast' in modname):
continue

Expand Down
2 changes: 1 addition & 1 deletion sklearn/utils/_testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ def is_abstract(c):
path=path, prefix='sklearn.', onerror=lambda x: None):
if ".tests." in modname or "externals" in modname:
continue
if IS_PYPY and ('_svmlight_format' in modname or
if IS_PYPY and ('_svmlight_format_io' in modname or
'feature_extraction._hashing_fast' in modname):
continue
# Ignore deprecation warnings triggered at import time.
Expand Down