Skip to content

Commit fffdfaa

Browse files
committed
Merge pull request scikit-learn#3240 from JelleZijlstra/fix-defaultdict
FIX defaultdict call for some Python versions
2 parents ff8b12d + fe6b9ea commit fffdfaa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sklearn/feature_extraction/text.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,7 @@ def _count_vocab(self, raw_documents, fixed_vocab):
726726
vocabulary = self.vocabulary_
727727
else:
728728
# Add a new value when a new vocabulary item is seen
729-
vocabulary = defaultdict(None)
729+
vocabulary = defaultdict()
730730
vocabulary.default_factory = vocabulary.__len__
731731

732732
analyze = self.build_analyzer()

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy