NumPy - Creating Arrays
The code below throws an error. What is the mistake?
import numpy as np matrix = np.eye(4, 3, k=4) print(matrix)
import numpy as np matrix = np.eye(4, 3, k=4) print(matrix)
k=4 means the diagonal of 1s is shifted 4 above the main diagonal.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions