Write a NumPy program to create a 3x3 identity matrix.
import numpy as np array_2D=np.identity(3) print('3x3 matrix:') print(array_2D)
Sample Output:
3x3 matrix: [[ 1. 0. 0.] [ 0. 1. 0.] [ 0. 0. 1.]]
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Sample Output: