Tensor.full_like()
Creates a tensor with the same shape and type (unless a new type is provided) as a given tensor, filled with fill_value.
Usage
from tinygrad.tensor import Tensor
tensor = Tensor([[1, 2], [3, 4]])
x = Tensor.full_like(tensor, 5)
print(x.numpy())
Return value
[[5. 5.]
[5. 5.]]