api / koma.matrix / MatrixFactory / eye

eye

abstract fun eye(size:Int):T

Creates an identity matrix of the requested shape

abstract fun eye(rows:Int, cols:Int):T

Creates an identity matrix of the requested shape, with zero padding if the axis lengths arent equal.