Skip to content

Commit

Permalink
DOC: require pyarrow (#151)
Browse files Browse the repository at this point in the history
* DOC: require pyarrow

* Update tests to work with pandas 2.2.0
  • Loading branch information
hagenw authored Jan 24, 2024
1 parent f19782e commit 28a2f59
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ auditok
ipykernel
jupyter-sphinx
librosa
pyarrow
sphinx
sphinx-audeering-theme >=1.2.1
sphinx-autodoc-typehints
Expand Down
11 changes: 5 additions & 6 deletions tests/test_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ def test_process_index_filewise_end_times(tmpdir):
None,
None,
False,
np.array([1., 2., 3.]),
np.array([[1., 2., 3.]]),
),
(
None,
Expand All @@ -769,7 +769,7 @@ def test_process_index_filewise_end_times(tmpdir):
None,
None,
False,
np.array([1., 2., 3.]),
np.array([[1., 2., 3.]]),
),
(
None,
Expand All @@ -781,7 +781,7 @@ def test_process_index_filewise_end_times(tmpdir):
None,
None,
False,
np.array([1., 2.]),
np.array([[1., 2.]]),
),
(
None,
Expand All @@ -793,7 +793,7 @@ def test_process_index_filewise_end_times(tmpdir):
None,
None,
False,
np.array([1., 2.]),
np.array([[1., 2.]]),
),
(
signal_max,
Expand Down Expand Up @@ -993,7 +993,6 @@ def test_process_signal(
start=start,
end=end,
)
signal = np.atleast_2d(signal)
if start is None or pd.isna(start):
start = pd.to_timedelta(0)
elif isinstance(start, (int, float)):
Expand All @@ -1002,7 +1001,7 @@ def test_process_signal(
start = pd.to_timedelta(start)
if end is None or (pd.isna(end) and not keep_nat):
end = pd.to_timedelta(
signal.shape[1] / sampling_rate,
np.atleast_2d(signal).shape[1] / sampling_rate,
unit='s',
)
elif isinstance(end, (int, float)):
Expand Down

0 comments on commit 28a2f59

Please sign in to comment.