adelie.matrix.kronecker_eye#

adelie.matrix.kronecker_eye(mat: ndarray | MatrixNaiveBase32 | MatrixNaiveBase64, K: int, *, copy: bool = False, n_threads: int = 1)[source]#

Creates a Kronecker product with identity matrix.

The matrix is represented as \(X \otimes I_K\) where \(X\) is the underlying dense matrix and \(I_K\) is the identity matrix of dimension \(K\).

Note

This matrix only works for naive method!

Parameters:
matUnion[ndarray, MatrixNaiveBase32, MatrixNaiveBase64]

The matrix to view as a Kronecker product with identity matrix. If numpy.ndarray, a specialized class is created with more optimized routines.

Kint

Dimension of the identity matrix.

copybool, optional

This argument is only used if mat is a numpy.ndarray. If True, a copy of mat is stored internally. Otherwise, a reference is stored instead. Default is False.

n_threadsint, optional

Number of threads. Default is 1.

Returns:
wrap

Wrapper matrix object.