MAINT lower memory usage of test_pickling_vectorizer
@@ -1093,9 +1093,9 @@ def test_pickling_vectorizer():
if IS_PYPY and isinstance(orig, HashingVectorizer):
continue
else:
- assert_array_equal(
- copy.fit_transform(JUNK_FOOD_DOCS).toarray(),
- orig.fit_transform(JUNK_FOOD_DOCS).toarray(),
+ assert_allclose_dense_sparse(
+ copy.fit_transform(JUNK_FOOD_DOCS),
+ orig.fit_transform(JUNK_FOOD_DOCS),
)
