
Vectors and Matrices
Vectors are ordered arrays of numbers. The elements of a vector are all the same type. A vector does not, for example, contain both characters and numbers.Here, we will represent vectors as NumPy 1D arrays.1D array, shape (n,): n elements indexed [0] through [n1]a = np.zeros(4);a = np.array([5,4,3,2]);both of them above, onedimensional vector a with four elements.a.shape […]