NumPy - Creating Arrays
What is the output of the following code?
import numpy as np print(np.eye(3, k=1))
import numpy as np print(np.eye(3, k=1))
k=1 shifts the diagonal of 1s one above the main diagonal.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions