[RFC]: make axis
kwarg optional in squeeze
#892
Labels
API change
Changes to existing functions or objects in the API.
Needs Discussion
Needs further discussion.
RFC
Request for comments. Feature requests and proposed changes.
topic: Manipulation
Array manipulation and transformation.
Cross-referencing from data-apis/array-api-strict#62 :
The standard's version of
squeeze
hasaxis
as a required argument (https://data-apis.org/array-api/2023.12/API_specification/generated/array_api.squeeze.html#array_api.squeeze), while virtually all array libraries allowaxis=None
with the semantics of "remove all singleton dimensions":torch.squeeze(input: Tensor, dim: Optional[Union[int, List[int]]])
numpy.squeeze(a, axis=None)
jax.numpy.squeeze(a, axis=None)
Is there any deep reason to not follow the suit and allow the
axis
to beOptional[ int | tuple]
?The text was updated successfully, but these errors were encountered: