latest (dev)
Copy
Latest development documentation · Updated 2026-10-15
tensorplay.functional.broadcast_to
- tensorplay.functional.broadcast_to(input, shape) Tensor[source]
Broadcasts
inputto the shapeshape. Equivalent to callinginput.expand(shape). Seeexpand()for details.- Parameters:
input (Tensor) – the input tensor.
shape (list, tuple, or
tensorplay.Size) – the new shape.
Example:
>>> x = tensorplay.tensor([1, 2, 3]) >>> tensorplay.broadcast_to(x, (3, 3)) tensor([[1, 2, 3], [1, 2, 3], [1, 2, 3]])
Help improve this page
Found an error, an unclear step, or a missing example?
Was this page helpful?

