Python, Machine Learning, Artificial Intelligence, Programming, Matrix.
instance of np.ndarray . This is the class that implements vectors and matrices. Let’s create our first array objects: import numpy as np a = np.array([1,2,3,4]) B = np.array([[1,2,3],[4,5,6]]) We have created a vector with four elements (that is implemented as a column vector) and a 2x3 matrix.