NumPy - Creating Arrays
Which of the following commands correctly creates a 4x4 identity matrix using NumPy?
np.eye(N, M=None, k=0) creates an N x M matrix with ones on the k-th diagonal.np.eye(4) creates a 4x4 identity matrix with ones on the main diagonal (k=0 by default).15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions