To convert a 1-D array into a 2D column vector, an additional dimension must be added. Transposing numpy array is extremely simple using np.transpose function. The numpy.transpose() function changes the row elements into column elements and the column elements into row elements. array([1, 2, 3]) are actually the same – they only differ in whitespace. when you just want the vector. Create a Python Matrix using the nested list data type; Create Python Matrix using Arrays from Python Numpy package; Create Python Matrix using a nested list data type. #Original Matrix x = [[1 ... [1, 3, 5] [2, 4, 6] Method 4 - Matrix transpose using numpy library Numpy library is an array-processing package built to efficiently manipulate large multi-dimensional array. Use transpose(arr, argsort(axes)) to invert the transposition of tensors when using the axes keyword argument. The Tattribute returns a view of the original array, and changing one changes the other. In this Numpy transpose tutorial, we have seen how to use transpose() function on numpy array and numpy matrix, the difference between numpy matrix and array, and how to convert 1D to the 2D array. 1. numpy.shares_memory() — Nu… The python matrix makes use of arrays, and the same can be implemented. See the following code. Equivalent to np.transpose(self) if self is real-valued. numpy.matrix.H¶ matrix.H¶. Fundamentally, transposing numpy array only make sense when you have array of 2 or more than 2 dimensions. Following is a simple example of nested list which could be considered as a 2x3 matrix. If the array is one-dimensional, this means it has no effect. The function takes the following parameters. Syntax of numpy.transpose(): numpy.transpose(ar, axes=None) Parameters. NumPy is an extremely popular library among data scientist heavily used for large computation of array, matrices and many more with Python. To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. The 0 refers to the outermost array.. Syntax. Also, read: Create 2D array from a list of lists in Python .