#Import the NumPy library import numpy as np #Initiating NumPy array arr = np.array([[1, 2], [3, 4], [5, 6]]) #Transposing a matrix (or 2D array) transposed_arr = arr.T #Displays results print(transposed_arr)