EXA Avoiding TypeError when using --all_categories in plot_document_classification_20newsgroups.py
@@ -145,7 +145,7 @@ print("%d documents - %0.3fMB (training set)" % (
len(data_train.data), data_train_size_mb))
print("%d documents - %0.3fMB (test set)" % (
len(data_test.data), data_test_size_mb))
-print("%d categories" % len(categories))
+print("%d categories" % len(target_names))
print()
# split a training set and a test set
