#!/usr/bin/env python3 import numpy as np # Create 4x3 matrix matrix = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12]]) # Reshape matrix into 2x6 matrix new_matrix=matrix.reshape(2, 6) print(new_matrix) # [[ 1 2 3 4 5 6] # [ 7 8 9 10 11 12]]