Skip to content

Commit e3e01c8

Browse files
committed
MAINT: block axis=None in squeeze
closes #62
1 parent 590a2de commit e3e01c8

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)