What is the output of np.eye(3)?
Correct answer
A. Identity matrix of order 3
11 views
A. Identity matrix of order 3
11 views
np.eye(3) returns the identity matrix of order 3: a 3×3 array with ones on the main diagonal and zeros everywhere else.
Multiplying any 3×3 matrix by it leaves that matrix unchanged. np.identity(3) gives the same result.
Practise more Data Science MCQs with answers and explanations on MCQsExam.com.
Not sure why the answer is A? Ask here and get an explanation.