NumPy > Create identity matrix

Name
Code
Output
array = numpy.eye(3)
print (array)
print ("shape",array.shape)
[[ 1.  0.  0.]
 [ 0.  1.  0.]
 [ 0.  0.  1.]]
shape (3, 3)