TensoreyeTensor.eye() Returns the identity tensor of size n x n. Usage from tinygrad.tensor import Tensor a1 = Tensor.eye(5) print(a1.numpy()) Return value [[1. 0. 0. 0. 0.] [0. 1. 0. 0. 0.] [0. 0. 1. 0. 0.] [0. 0. 0. 1. 0.] [0. 0. 0. 0. 1.]]expandflatten