identity matrix in python

Solutions on MaxInterview for identity matrix in python by the best coders in the world

showing results for - "identity matrix in python"
Marceau
01 Sep 2020
1#Change the value 3 to the size of the identity matrix
2>>>np.identity(3)
3array([[1.,  0.,  0.],
4       [0.,  1.,  0.],
5       [0.,  0.,  1.]])
6