Tensor.stack()
Returns a tensor with a dimension of size one inserted at the specified position.
Usage
from tinygrad.tensor import Tensor
a1 = Tensor([1, 2, 3, 4])
a2 = Tensor([2, 3, 4, 5])
a1 = a1.stack([a2, a2])
print(a1.numpy())
Return value
[[2. 3. 4. 5.]
[2. 3. 4. 5.]]