PHP - Manual: Lapack::identity
2025-10-23
(PECL lapack >= 0.1.0)
Lapack::identity — Return an identity matrix
$n
) : arrayReturn a size n identity matrix
nThe height and width of the identity matrix.
Will return a an array of n arrays, each containing n entries. The diagonals of the matrix will be 1s, the other positions 0.