Skip to content

Commit

Permalink
TST: Fix test in common.labels (#747)
Browse files Browse the repository at this point in the history
* Fix assertion in tests/test_common/test_labels.py -- we now get back pandas.arrays.StringArray

* Change dependency to 'dask[dataframe]' to squelch warning
  • Loading branch information
NickleDave authored May 1, 2024
1 parent 55d1a18 commit e2c1a71
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ license = {file = "LICENSE"}
dependencies = [
"attrs >=19.3.0",
"crowsetta >=5.0.1",
"dask >=2.10.1",
"dask[dataframe] >=2.10.1",
"evfuncs >=0.3.4",
"joblib >=0.14.1",
"pytorch-lightning >=2.0.7",
Expand Down
4 changes: 2 additions & 2 deletions tests/test_common/test_labels.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import copy
import pathlib

import numpy as np
import pandas as pd
import pytest

import vak.common.files.spect
Expand Down Expand Up @@ -72,7 +72,7 @@ def test_from_df(config_type, model_name, audio_format, spect_format, annot_form

out = vak.common.labels.from_df(df, dataset_path)
assert isinstance(out, list)
assert all([isinstance(labels, np.ndarray) for labels in out])
assert all([isinstance(labels, (np.ndarray, pd.arrays.StringArray)) for labels in out])


INTS_LABELMAP = {str(val): val for val in range(1, 20)}
Expand Down

0 comments on commit e2c1a71

Please sign in to comment.