mm.math.eye¶
- math.eye(dtype=None)¶
The identity matrix of size.
- Parameters:
size (
int
) – The size of the identity matrixdtype – The data type of the identity matrix. If
None
, the returned matrix is of typefloat
.
- Return type:
ndarray
[Tuple
[int
,...
],Union
[TypeVar
(R
,float16
,float32
,float64
),TypeVar
(C
,complex64
,complex128
),TypeVar
(Z
,int16
,int32
,int64
),TypeVar
(N
,uint16
,uint32
,uint64
)]]- Returns:
The identity matrix.
code/api/mrmustard.math.eye
Download Python script
Download Notebook
View on GitHub