Skip to content

Commit

Permalink
Use unstack from array-api-compat (#602)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomwhite authored Oct 29, 2024
1 parent cd358c6 commit 1f0f81a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cubed/array_api/manipulation_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,5 @@ def key_function(out_key):
def _unstack_chunk(*arrs, axis=0):
# unstack each array in arrs and yield all in turn
for arr in arrs:
# TODO: replace with nxp.unstack(arr, axis=axis) when array-api-compat has unstack
for a in tuple(nxp.moveaxis(arr, axis, 0)):
for a in nxp.unstack(arr, axis=axis):
yield a

0 comments on commit 1f0f81a

Please sign in to comment.