8000 Fix plot_out_of_core_classification.py. (#9815) · scikit-learn/scikit-learn@cceb9b2 · GitHub
[go: up one dir, main page]

Skip to content

Commit cceb9b2

Browse files
authored
Fix plot_out_of_core_classification.py. (#9815)
Starting from empty ~/scikit_learn_data got AttributeError: module 'sklearn.externals.six.moves.urllib_request' has no attribute 'urlretrieve'.
1 parent 6c99d79 commit cceb9b2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/applications/plot_out_of_core_classification.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
from matplotlib import rcParams
4242

4343
from sklearn.externals.six.moves import html_parser
44-
from sklearn.externals.six.moves import urllib
44+
from sklearn.externals.six.moves.urllib.request import urlretrieve
4545
from sklearn.datasets import get_data_home
4646
from sklearn.feature_extraction.text import HashingVectorizer
4747
from sklearn.linear_model import SGDClassifier
@@ -172,8 +172,8 @@ def progress(blocknum, bs, size):
172172
end='')
173173

174174
archive_path = os.path.join(data_path, ARCHIVE_FILENAME)
175-
urllib.request.urlretrieve(DOWNLOAD_URL, filename=archive_path,
176-
reporthook=progress)
175+
urlretrieve(DOWNLOAD_URL, filename=archive_path,
176+
reporthook=progress)
177177
if _not_in_sphinx():
178178
print('\r', end='')
179179
print("untarring Reuters dataset...")

0 commit comments

Comments
 (0)
0