Initializes the identity tensor, with all axes of the given dimension and entries of one where all indices are equal, zero elsewhere.
The length of every axis
Optional
The number of axes
const result = Chalkboard.tens.identity(2, 3); // Returns [[[1, 0], [0, 0]], [[0, 0], [0, 1]]] Copy
const result = Chalkboard.tens.identity(2, 3); // Returns [[[1, 0], [0, 0]], [[0, 0], [0, 1]]]
Initializes the identity tensor, with all axes of the given dimension and entries of one where all indices are equal, zero elsewhere.