classmethod galois.Array.Identity(size: int, dtype: DTypeLike | None = None) Self

Creates an \(n \times n\) identity matrix.

Parameters
size: int

The size \(n\) along one dimension of the identity matrix.

dtype: DTypeLike | None = None

The numpy.dtype of the array elements. The default is None which represents the smallest unsigned data type for this Array subclass (the first element in dtypes).

Returns

A 2-D identity matrix with shape (size, size).