-
Notifications
You must be signed in to change notification settings - Fork 52
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
Add unstack
#604
Conversation
There was a problem hiding this 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.
There was a problem hiding this 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.
Merged now, thanks @steff456 |
This PR adds
unstack
to the specification, fixes #487.