#NUMPY011. 创建3x3单位矩阵

创建3x3单位矩阵

描述

创建一个 3×33\times3 的单位矩阵(对角线为 1,其余为 0)。

格式

输入

输出

numpy\texttt{numpy} 打印的 3×33\times3 单位矩阵。

样例


[[1. 0. 0.]
 [0. 1. 0.]
 [0. 0. 1.]]

提示

np.eye\texttt{np.eye}(3) 或 np.identity\texttt{np.identity}(3) —— 创建单位矩阵。