Skip to content

Commit 8d2425e

Browse files
fix moveaxis
1 parent b10273b commit 8d2425e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

array_api_compat/paddle/_aliases.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ def _reduce_multiple_axes(f, x, axis, keepdims=False, **kwargs):
445445
# Some reductions don't support multiple axes
446446
axes = _normalize_axes(axis, x.ndim)
447447
for a in reversed(axes):
448-
x = paddle.movedim(x, a, -1)
448+
x = paddle.moveaxis(x, a, -1)
449449
x = paddle.flatten(x, -len(axes))
450450

451451
out = f(x, -1, **kwargs)
@@ -922,8 +922,7 @@ def astype(
922922

923923

924924
def broadcast_arrays(*arrays: array) -> List[array]:
925-
shape = broadcast_shapes(*[a.shape for a in arrays])
926-
return [paddle.broadcast_to(a, shape) for a in arrays]
925+
return paddle.broadcast_tensors(arrays)
927926

928927

929928
# Note that these named tuples aren't actually part of the standard namespace,

0 commit comments

Comments
 (0)