Learn practical skills, build real-world projects, and advance your career
import numpy as np
np.eye(5)
array([[1., 0., 0., 0., 0.],
       [0., 1., 0., 0., 0.],
       [0., 0., 1., 0., 0.],
       [0., 0., 0., 1., 0.],
       [0., 0., 0., 0., 1.]])
np.arange(5)
array([0, 1, 2, 3, 4])
np.zeros(5)
array([0., 0., 0., 0., 0.])
np.zeros([5,5])
array([[0., 0., 0., 0., 0.],
       [0., 0., 0., 0., 0.],
       [0., 0., 0., 0., 0.],
       [0., 0., 0., 0., 0.],
       [0., 0., 0., 0., 0.]])