Skip to content

Commit da06dae

Browse files
committed
torch.broadcast_arrays: make it return a tuple
1 parent e240e75 commit da06dae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

array_api_compat/torch/_aliases.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -711,9 +711,9 @@ def astype(
711711
return x.to(dtype=dtype, copy=copy)
712712

713713

714-
def broadcast_arrays(*arrays: Array) -> list[Array]:
714+
def broadcast_arrays(*arrays: Array) -> tuple[Array, ...]:
715715
shape = torch.broadcast_shapes(*[a.shape for a in arrays])
716-
return [torch.broadcast_to(a, shape) for a in arrays]
716+
return tuple(torch.broadcast_to(a, shape) for a in arrays)
717717

718718
# Note that these named tuples aren't actually part of the standard namespace,
719719
# but I don't see any issue with exporting the names here regardless.

0 commit comments

Comments
 (0)