Returns a square slice of element type E with ones on the main diagonal and zeros elsewhere.
number of rows and columns
new identity slice
assert(identity(2) == [[1.0, 0.0], [0.0, 1.0]]);
See Implementation
Returns a square slice of element type E with ones on the main diagonal and zeros elsewhere.