tensorly.eye

eye(N)

Return a 2-D tensor with ones on the diagonal and zeros elsewhere.

Parameters:

N : int

Number of rows in the output.