Thanks to visit codestin.com
Credit goes to github.com

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)