From 75cb820e3c9c282e3ce04ac0409dec8e5846184f Mon Sep 17 00:00:00 2001 From: Arthur Date: Sun, 19 Oct 2025 23:53:29 +0200 Subject: [PATCH 1/3] FIX: larger inputs for sorting tests --- array_api_tests/test_sorting_functions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/array_api_tests/test_sorting_functions.py b/array_api_tests/test_sorting_functions.py index 3d25798c..deb3bcd8 100644 --- a/array_api_tests/test_sorting_functions.py +++ b/array_api_tests/test_sorting_functions.py @@ -33,7 +33,7 @@ def assert_scalar_in_set( @given( x=hh.arrays( dtype=hh.real_dtypes, - shape=hh.shapes(min_dims=1, min_side=1), + shape=hh.shapes(min_dims=1, min_side=1, max_side=50), elements={"allow_nan": False}, ), data=st.data(), From 8d797c3abec282cc3abe136ac390c0f99f4e0dd0 Mon Sep 17 00:00:00 2001 From: Arthur Date: Mon, 20 Oct 2025 00:10:24 +0200 Subject: [PATCH 2/3] for sort too --- array_api_tests/test_sorting_functions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/array_api_tests/test_sorting_functions.py b/array_api_tests/test_sorting_functions.py index deb3bcd8..758fcc5c 100644 --- a/array_api_tests/test_sorting_functions.py +++ b/array_api_tests/test_sorting_functions.py @@ -94,7 +94,7 @@ def test_argsort(x, data): @given( x=hh.arrays( dtype=hh.real_dtypes, - shape=hh.shapes(min_dims=1, min_side=1), + shape=hh.shapes(min_dims=1, min_side=1, max_side=50), elements={"allow_nan": False}, ), data=st.data(), From ed241bfcc2ef47798bbb894737d12499142d4bbb Mon Sep 17 00:00:00 2001 From: Arthur Date: Tue, 28 Oct 2025 15:53:42 +0100 Subject: [PATCH 3/3] add comment about max_side=50 --- array_api_tests/test_sorting_functions.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/array_api_tests/test_sorting_functions.py b/array_api_tests/test_sorting_functions.py index 758fcc5c..27d42eee 100644 --- a/array_api_tests/test_sorting_functions.py +++ b/array_api_tests/test_sorting_functions.py @@ -34,6 +34,8 @@ def assert_scalar_in_set( x=hh.arrays( dtype=hh.real_dtypes, shape=hh.shapes(min_dims=1, min_side=1, max_side=50), + # argsort needs to be tested on big enough arrays, hence we set `max_side=50` + # see https://github.com/data-apis/array-api-tests/issues/389 elements={"allow_nan": False}, ), data=st.data(), @@ -95,6 +97,8 @@ def test_argsort(x, data): x=hh.arrays( dtype=hh.real_dtypes, shape=hh.shapes(min_dims=1, min_side=1, max_side=50), + # sort needs to be tested on big enough arrays, hence we set `max_side=50` + # see https://github.com/data-apis/array-api-tests/issues/389 elements={"allow_nan": False}, ), data=st.data(),