Skip to content

Add unstack #604

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 21, 2023
Merged

Add unstack #604

merged 4 commits into from
Mar 21, 2023

Conversation

steff456
Copy link
Member

This PR adds unstack to the specification, fixes #487.

  • Adds the signature inside the manipulation functions
  • Adds the reference in the table of contents

Sorry, something went wrong.

@steff456 steff456 added the API extension Adds new functions or objects to the API. label Feb 21, 2023
@steff456 steff456 requested review from rgommers and kgryte February 21, 2023 22:18
@steff456 steff456 self-assigned this Feb 21, 2023
@rgommers rgommers added this to the v2023 milestone Mar 8, 2023
Copy link
Member

@rgommers rgommers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good overall, just some minor comments.

The axis=0 default is right, and the return type should indeed be tuple. I cross-checked with torch.unbind and tf.unstack, and the latter gets the return type wrong: it's annotated as Sequence[Any] and the code can return a list. We've learned that a tuple is better, since this should not be appended to, and a list is actually problematic for at least Numba.

Copy link
Member

@rgommers rgommers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM now, thanks @steff456. I'll leave it open for a few days in case there are more comments.

@rgommers rgommers changed the title Add unstack Add unstack Mar 21, 2023
@rgommers rgommers merged commit 8a3e6bc into data-apis:main Mar 21, 2023
@rgommers
Copy link
Member

Merged now, thanks @steff456

@kgryte kgryte deleted the add-unstack branch February 25, 2024 05:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API extension Adds new functions or objects to the API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add unstack?
2 participants