Tensor.expand()
Returns a new view of the tensor with singleton dimensions expanded to a larger size.
Usage
from tinygrad.tensor import Tensor
tensor = Tensor([[1], [2], [3]])
tensor = tensor.expand(3, 4)
print(tensor.numpy())
Return value
[[1. 1. 1. 1.]
[2. 2. 2. 2.]
[3. 3. 3. 3.]]