From ba6d59c2cddbb6b04464d7b92dd46e4c0f2a5c37 Mon Sep 17 00:00:00 2001 From: Langning Zhang Date: Thu, 13 Aug 2026 04:06:59 +0800 Subject: [PATCH] BUG: use Python integers for repeat slice bounds --- array_api_tests/test_manipulation_functions.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/array_api_tests/test_manipulation_functions.py b/array_api_tests/test_manipulation_functions.py index 8fda5bcd..56b48051 100644 --- a/array_api_tests/test_manipulation_functions.py +++ b/array_api_tests/test_manipulation_functions.py @@ -410,10 +410,11 @@ def test_repeat(x, kw, data): out_slice = out[idx] start = 0 for i, count in enumerate(repeats_array): + count = int(count) end = start + count x_slice_i = dh.get_scalar_type(x.dtype)((x_slice[i])) ph.assert_array_elements("repeat", out=out_slice[start:end], - expected=xp.full((int(count),), x_slice_i, dtype=x.dtype), + expected=xp.full((count,), x_slice_i, dtype=x.dtype), kw=kw) start = end