Skip to content

Commit dd3a06f

Browse files
authoredFeb 18, 2025
Merge pull request #125 from ev-br/squeeze
MAINT: block axis=None in squeeze
2 parents f88f7a8 + e3e01c8 commit dd3a06f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎array_api_strict/_manipulation_functions.py

+5
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,11 @@ def squeeze(x: Array, /, axis: Union[int, Tuple[int, ...]]) -> Array:
153153
154154
See its docstring for more information.
155155
"""
156+
if axis is None:
157+
raise ValueError(
158+
"squeeze(..., axis=None is not supported. See "
159+
"https://github.com/data-apis/array-api/pull/100 for a discussion."
160+
)
156161
return Array._new(np.squeeze(x._array, axis=axis), device=x.device)
157162

158163

0 commit comments

Comments
 (0)