diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index afac1176d..f976eab2a 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -41,4 +41,4 @@ jobs: - name: Run tests shell: bash -l {0} - run: pytest -v \ No newline at end of file + run: pytest -v diff --git a/.gitignore b/.gitignore index 4c9132fad..3a2f2a59f 100644 --- a/.gitignore +++ b/.gitignore @@ -94,6 +94,9 @@ ENV/ .spyderproject .spyproject +# VS Code +*.code-workspace + # Rope project settings .ropeproject diff --git a/tests/feature_extraction/test_text.py b/tests/feature_extraction/test_text.py index 01323f106..e8416826d 100644 --- a/tests/feature_extraction/test_text.py +++ b/tests/feature_extraction/test_text.py @@ -32,7 +32,9 @@ ) def test_basic(vect, container): b = db.from_sequence(JUNK_FOOD_DOCS, npartitions=2) - if container == "series": + if type(vect) == dask_ml.feature_extraction.text.FeatureHasher: + b = b.str.split() + elif container == "series": b = b.to_dataframe(columns=["text"])["text"] elif container == "array": b = b.to_dataframe(columns=["text"])["text"].values diff --git a/tests/preprocessing/test_encoders.py b/tests/preprocessing/test_encoders.py index 6866b1477..c4f5a5370 100644 --- a/tests/preprocessing/test_encoders.py +++ b/tests/preprocessing/test_encoders.py @@ -11,7 +11,7 @@ from dask_ml._compat import DASK_2_20_0, PANDAS_VERSION from dask_ml.utils import assert_estimator_equal -X = np.array([["a"], ["a"], ["b"], ["c"]]) +X = np.array([["a"], ["a"], ["b"], ["c"]], dtype=object) dX = da.from_array(X, 2) df = pd.DataFrame(X, columns=["A"]).apply(lambda x: x.astype("category")) ddf = dd.from_pandas(df, npartitions=2)