Skip to content

Commit

Permalink
TST: make compatible with numpy 2.0 (#152)
Browse files Browse the repository at this point in the history
  • Loading branch information
hagenw authored Jun 19, 2024
1 parent 543766c commit 2d04044
Showing 1 changed file with 25 additions and 25 deletions.
50 changes: 25 additions & 25 deletions tests/test_audiofile.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,12 +546,12 @@ def test_other_formats():
("None", "None", [[0.0, 0.0, 0.1, 0.1, 0.2, 0.2]]),
("NaN", "NaN", [[0.0, 0.0, 0.1, 0.1, 0.2, 0.2]]),
("NaT", "NaT", [[0.0, 0.0, 0.1, 0.1, 0.2, 0.2]]),
(np.NaN, np.NaN, [[0.0, 0.0, 0.1, 0.1, 0.2, 0.2]]),
(np.nan, np.nan, [[0.0, 0.0, 0.1, 0.1, 0.2, 0.2]]),
(pd.NaT, pd.NaT, [[0.0, 0.0, 0.1, 0.1, 0.2, 0.2]]),
# None | positive
(None, np.Inf, [[0.0, 0.0, 0.1, 0.1, 0.2, 0.2]]),
(None, np.inf, [[0.0, 0.0, 0.1, 0.1, 0.2, 0.2]]),
# positive | None
(np.Inf, None, [[]]),
(np.inf, None, [[]]),
(0.0, None, [[0.0, 0.0, 0.1, 0.1, 0.2, 0.2]]),
(0.5, None, [[0.0, 0.1, 0.1, 0.2, 0.2]]),
(1.0, None, [[0.1, 0.1, 0.2, 0.2]]),
Expand All @@ -572,16 +572,16 @@ def test_other_formats():
("7", "None", [[]]),
("8", "None", [[]]),
# positive | positive
(np.Inf, np.Inf, [[]]),
(np.Inf, 1.0, [[]]),
(0.0, np.Inf, [[0.0, 0.0, 0.1, 0.1, 0.2, 0.2]]),
(0.5, np.Inf, [[0.0, 0.1, 0.1, 0.2, 0.2]]),
(1.0, np.Inf, [[0.1, 0.1, 0.2, 0.2]]),
(1.5, np.Inf, [[0.1, 0.2, 0.2]]),
(2.0, np.Inf, [[0.2, 0.2]]),
(2.5, np.Inf, [[0.2]]),
(3.0, np.Inf, [[]]),
(3.5, np.Inf, [[]]),
(np.inf, np.inf, [[]]),
(np.inf, 1.0, [[]]),
(0.0, np.inf, [[0.0, 0.0, 0.1, 0.1, 0.2, 0.2]]),
(0.5, np.inf, [[0.0, 0.1, 0.1, 0.2, 0.2]]),
(1.0, np.inf, [[0.1, 0.1, 0.2, 0.2]]),
(1.5, np.inf, [[0.1, 0.2, 0.2]]),
(2.0, np.inf, [[0.2, 0.2]]),
(2.5, np.inf, [[0.2]]),
(3.0, np.inf, [[]]),
(3.5, np.inf, [[]]),
(0.0, 0.0, [[]]),
(0.5, 0.0, [[]]),
(1.0, 0.0, [[]]),
Expand Down Expand Up @@ -705,7 +705,7 @@ def test_other_formats():
("6", "7", [[]]),
("0", "8", [[0.0, 0.0, 0.1, 0.1, 0.2, 0.2]]),
# None | negative
(None, -np.Inf, [[0.0, 0.0, 0.1, 0.1, 0.2, 0.2]]),
(None, -np.inf, [[0.0, 0.0, 0.1, 0.1, 0.2, 0.2]]),
(None, -0.5, [[0.2]]),
(None, -1.0, [[0.2, 0.2]]),
(None, -1.5, [[0.1, 0.2, 0.2]]),
Expand All @@ -724,7 +724,7 @@ def test_other_formats():
("None", "-7", [[0.0, 0.0, 0.1, 0.1, 0.2, 0.2]]),
("None", "-8", [[0.0, 0.0, 0.1, 0.1, 0.2, 0.2]]),
# negative | None
(-np.Inf, None, [[0.0, 0.0, 0.1, 0.1, 0.2, 0.2]]),
(-np.inf, None, [[0.0, 0.0, 0.1, 0.1, 0.2, 0.2]]),
(-0.5, None, [[0.2]]),
(-1.0, None, [[0.2, 0.2]]),
(-1.5, None, [[0.1, 0.2, 0.2]]),
Expand All @@ -743,9 +743,9 @@ def test_other_formats():
("-7", "None", [[0.0, 0.0, 0.1, 0.1, 0.2, 0.2]]),
("-7", "None", [[0.0, 0.0, 0.1, 0.1, 0.2, 0.2]]),
# negative | positive
(-np.Inf, np.Inf, [[0.0, 0.0, 0.1, 0.1, 0.2, 0.2]]),
(-np.Inf, 4.0, [[]]),
(-4.0, np.Inf, [[0.0, 0.0, 0.1, 0.1, 0.2, 0.2]]),
(-np.inf, np.inf, [[0.0, 0.0, 0.1, 0.1, 0.2, 0.2]]),
(-np.inf, 4.0, [[]]),
(-4.0, np.inf, [[0.0, 0.0, 0.1, 0.1, 0.2, 0.2]]),
(-0.5, 0.0, [[]]),
(-1.0, 0.0, [[]]),
(-1.5, 0.0, [[]]),
Expand Down Expand Up @@ -836,10 +836,10 @@ def test_other_formats():
("-9", "4", [[0.0]]),
("-10", "4", [[]]),
# positive | negative
(np.Inf, -np.Inf, [[0.0, 0.0, 0.1, 0.1, 0.2, 0.2]]),
(np.Inf, -4.0, [[]]),
(4.0, -np.Inf, [[0.0, 0.0, 0.1, 0.1, 0.2, 0.2]]),
(2.0, -np.Inf, [[0.0, 0.0, 0.1, 0.1]]),
(np.inf, -np.inf, [[0.0, 0.0, 0.1, 0.1, 0.2, 0.2]]),
(np.inf, -4.0, [[]]),
(4.0, -np.inf, [[0.0, 0.0, 0.1, 0.1, 0.2, 0.2]]),
(2.0, -np.inf, [[0.0, 0.0, 0.1, 0.1]]),
(0.0, -0.5, [[]]),
(0.5, -0.5, [[0.0]]),
(1.0, -0.5, [[0.0]]),
Expand Down Expand Up @@ -962,9 +962,9 @@ def test_other_formats():
("6", "-7", [[0.0, 0.0, 0.1, 0.1, 0.2, 0.2]]),
("6", "-8", [[0.0, 0.0, 0.1, 0.1, 0.2, 0.2]]),
# negative | negative
(-np.Inf, -np.Inf, [[]]),
(-np.Inf, -4.0, [[]]),
(-4.0, -np.Inf, [[]]),
(-np.inf, -np.inf, [[]]),
(-np.inf, -4.0, [[]]),
(-4.0, -np.inf, [[]]),
(-0.5, -0.5, [[0.2]]),
(-1.0, -0.5, [[0.1]]),
(-1.5, -0.5, [[0.1]]),
Expand Down

0 comments on commit 2d04044

Please sign in to comment.