Python, Machine Learning, Artificial Intelligence, Programming, Matrix.
allows us to do just that. It takes as input a tuple (or an integer) which represents the dimension of the new array. For example, to convert a 3x4 matrix to a 6x2 matrix we would do: # This is a 3x4 matrix A = np.array([[1,2,3,4],[5,6,7,8],[9,10,11,12]]) # This is a 6x2 matrix B = A.reshape((6,2))