Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

Question: Create a diagonal matrix using NumPy.
Answer: import numpy as npnarr = np.diag([1, 2, 3])
Is it helpful? Yes No

Most helpful rated by users:

©2025 WithoutBook