From 79ff688521e7bc1056c8f88b091de84329fc3b15 Mon Sep 17 00:00:00 2001 From: Evgeni Burovski Date: Fri, 16 May 2025 12:34:08 +0200 Subject: [PATCH] MAINT: make reshape require shape to be a tuple --- array_api_strict/_manipulation_functions.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/array_api_strict/_manipulation_functions.py b/array_api_strict/_manipulation_functions.py index fe4a608..5cd85d1 100644 --- a/array_api_strict/_manipulation_functions.py +++ b/array_api_strict/_manipulation_functions.py @@ -113,6 +113,8 @@ def reshape(x: Array, /, shape: tuple[int, ...], *, copy: bool | None = None) -> See its docstring for more information. """ + if not isinstance(shape, tuple): + raise TypeError(f"`shape` must be a tuple of ints; got {shape=} instead.") data = x._array if copy: