From b36e4c89a77fe7969a1f759187cb993b531d1093 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Tue, 27 Jan 2026 03:52:52 +0100 Subject: [PATCH] Fix ValueError in test_process by copying input array This fixes an error seen with NumPy 2.4: def test_process(data, converter_type, ratio=2.0): num_channels, input_data = data src = samplerate.Resampler(converter_type, num_channels) > src.process(input_data, ratio) E ValueError: cannot resize an array that references or is referenced E by another array in this way. E Use the np.resize function or refcheck=False --- tests/test_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_api.py b/tests/test_api.py index 1fef8de..f5b8fac 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -48,7 +48,7 @@ def test_simple(data, converter_type, ratio=2.0): def test_process(data, converter_type, ratio=2.0): num_channels, input_data = data src = samplerate.Resampler(converter_type, num_channels) - src.process(input_data, ratio) + src.process(input_data.copy(), ratio) def test_match(data, converter_type, ratio=2.0):