Identity Matrix

class fastmat.Eye

Bases: Matrix

For \(x \in \mathbb{C}^n\) we

map .. math::

x mapsto x.

note::

Eye.forward(x) returns the exact same object as the given input array x. Make sure to issue an explicit .copy() in case you need it!

The identity matrix only needs the dimension \(n\) of the vectors it acts on.

>>> # import the package
>>> import fastmat
>>> # set the parameter
>>> n = 10
>>> # construct the identity
>>> I = fastmat.Eye(n)

This yields the identity matrix \(I_{10}\) with dimension \(10\).

__init__()

Initialize Identity (Eye) matrix instance.

Parameters
orderint

Size of the desired identity matrix [order x order].

**optionsoptional

Additional keyworded arguments. Supports all optional arguments supported by fastmat.Matrix.