Python, Machine Learning, Numpy, Matplotlib.
rank-1 array of integers from 0 to 15 X_square = np.reshape(X, (4, 4)) # reshape X into a 4 x 4 matrix X_rank_3 = np.reshape(X, (2, 2, 4)) # reshape X to be 2 x 2 x 4 --a rank-3 array # consider as two rank-2 arrays with 2 rows and 4 columns print("Rank-1 array X: \n") print(X) print("\n Reshaped