Overview
>
klyn.math
>
NDArray
>
eye
Overview
Index
Tree
Deprecated
klyn.math.NDArray.eye
method
public static eye(size as Int) as NDArray<T>:
Description
Creates a new NDArray with ones on the diagonal and zeros elsewhere.
arr = NDArray<Int>.eye(3)
Parameters
size The size of the square matrix.
Returns
A new identity matrix. ``` arr = NDArray<Int>.eye(3) ```