Fix plot_out_of_core_classification.py.
Starting from empty ~/scikit_learn_data got AttributeError: module
'sklearn.externals.six.moves.urllib_request' has no attribute
'urlretrieve'.
@@ -41,7 +41,7 @@ import matplotlib.pyplot as plt
from matplotlib import rcParams
from sklearn.externals.six.moves import html_parser
-from sklearn.externals.six.moves import urllib
+from sklearn.externals.six.moves.urllib.request import urlretrieve
from sklearn.datasets import get_data_home
from sklearn.feature_extraction.text import HashingVectorizer
from sklearn.linear_model import SGDClassifier
@@ -172,7 +172,7 @@ def stream_reuters_documents(data_path=None):
end='')
archive_path = os.path.join(data_path, ARCHIVE_FILENAME)
- urllib.request.urlretrieve(DOWNLOAD_URL, filename=archive_path,
+ urlretrieve(DOWNLOAD_URL, filename=archive_path,
reporthook=progress)
if _not_in_sphinx():
print('\r', end='')
