File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -280,7 +280,7 @@ def test_countvectorizer_stop_words():
280280 assert_raises (ValueError , cv .get_stop_words )
281281 stoplist = ['some' , 'other' , 'words' ]
282282 cv .set_params (stop_words = stoplist )
283- assert_equal (cv .get_stop_words (), stoplist )
283+ assert_equal (cv .get_stop_words (), set ( stoplist ) )
284284
285285
286286def test_countvectorizer_empty_vocabulary ():
Original file line number Diff line number Diff line change @@ -88,8 +88,10 @@ def _check_stop_list(stop):
8888 return ENGLISH_STOP_WORDS
8989 elif isinstance (stop , six .string_types ):
9090 raise ValueError ("not a built-in stop list: %s" % stop )
91+ elif stop is None :
92+ return None
9193 else : # assume it's a collection
92- return stop
94+ return frozenset ( stop )
9395
9496
9597class VectorizerMixin (object ):
You can’t perform that action at this time.
0 commit comments