We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dd6d3e8 commit 9bce442Copy full SHA for 9bce442
1 file changed
array_api_compat/torch/_aliases.py
@@ -706,9 +706,9 @@ def astype(
706
return x.to(dtype=dtype, copy=copy)
707
708
709
-def broadcast_arrays(*arrays: Array) -> list[Array]:
+def broadcast_arrays(*arrays: Array) -> tuple[Array, ...]:
710
shape = torch.broadcast_shapes(*[a.shape for a in arrays])
711
- return [torch.broadcast_to(a, shape) for a in arrays]
+ return tuple(torch.broadcast_to(a, shape) for a in arrays)
712
713
# Note that these named tuples aren't actually part of the standard namespace,
714
# but I don't see any issue with exporting the names here regardless.
0 commit comments