From f8440a591d9ffd5ac7b4463394c825590163eed0 Mon Sep 17 00:00:00 2001 From: crusaderky Date: Tue, 22 Apr 2025 16:16:36 +0100 Subject: [PATCH] TST: flaky `test_single_axis` --- tests/test_funcs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_funcs.py b/tests/test_funcs.py index 652e12ef..0cee0b4d 100644 --- a/tests/test_funcs.py +++ b/tests/test_funcs.py @@ -521,7 +521,7 @@ def test_xp(self, xp: ModuleType): class TestExpandDims: def test_single_axis(self, xp: ModuleType): """Trivial case where xpx.expand_dims doesn't add anything to xp.expand_dims""" - a = xp.empty((2, 3, 4, 5)) + a = xp.asarray(np.reshape(np.arange(2 * 3 * 4 * 5), (2, 3, 4, 5))) for axis in range(-5, 4): b = expand_dims(a, axis=axis) xp_assert_equal(b, xp.expand_dims(a, axis=axis))