import numpy as np north = np.array([[10, 11, 12], [13, 14, 15]]) south = np.array([[20, 21, 22]]) east = np.array([[30], [31]]) by_row = np.concatenate((north, south), axis=0) by_column = np.concatenate((north, east), axis=1) print("north shape:", north.shape) print("south shape:", south.shape) print("east shape:", east.shape) print("by row:") for row in by_row: print(" ", row.tolist()) print("by row shape:", by_row.shape) print("by column:") for row in by_column: print(" ", row.tolist()) print("by column shape:", by_column.shape)