Learn practical skills, build real-world projects, and advance your career
Created 5 years ago
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.ones(5)
array([1., 1., 1., 1., 1.])
np.arange(5)
array([0, 1, 2, 3, 4])
np.zeros(5)
array([0., 0., 0., 0., 0.])