-
Notifications
You must be signed in to change notification settings - Fork 52
Closed as not planned
Labels
API changeChanges to existing functions or objects in the API.Changes to existing functions or objects in the API.Needs DiscussionNeeds further discussion.Needs further discussion.RFCRequest for comments. Feature requests and proposed changes.Request for comments. Feature requests and proposed changes.topic: ManipulationArray manipulation and transformation.Array manipulation and transformation.
Description
Cross-referencing from data-apis/array-api-strict#62 :
The standard's version of squeeze
has axis
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 allow axis=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 be Optional[ int | tuple]
?
Metadata
Metadata
Assignees
Labels
API changeChanges to existing functions or objects in the API.Changes to existing functions or objects in the API.Needs DiscussionNeeds further discussion.Needs further discussion.RFCRequest for comments. Feature requests and proposed changes.Request for comments. Feature requests and proposed changes.topic: ManipulationArray manipulation and transformation.Array manipulation and transformation.