Skip to content

Commit ca9ae69

Browse files
committed
fix: update shape assignment in xp_take_along_axis to use tuple unpacking
1 parent 5acb937 commit ca9ae69

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

deepmd/dpmodel/array_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def xp_take_along_axis(arr, indices, axis):
6060

6161
shape = list(arr.shape)
6262
shape.pop(-1)
63-
shape = [*shape, n]
63+
shape = (*shape, n)
6464

6565
arr = xp.reshape(arr, (-1,))
6666
if n != 0:

0 commit comments

Comments
 (0)