Python | Numpy numpy.matrix.T() Last Updated : 08 Apr, 2019 Comments Improve Suggest changes Like Article Like Report With the help of Numpy numpy.matrix.T() method, we can make a Transpose of any matrix either having dimension one or more than more. Syntax : numpy.matrix.T() Return : Return transpose of every matrix Example #1 : In this example we can see that with the help of matrix.T() method, we are able to transform any type of matrix. Python3 1== # import the important module in python import numpy as np # make a matrix with numpy gfg = np.matrix('[1, 2, 3, 4]') # applying matrix.T() method geeks = gfg.getT() print(geeks) Output: [[1] [2] [3] [4]] Example #2 : Python3 1== # import the important module in python import numpy as np # make a matrix with numpy gfg = np.matrix('[1, 2, 3; 4, 5, 6; 7, 8, 9]') # applying matrix.T() method geeks = gfg.getT() print(geeks) Output: [[1 4 7] [2 5 8] [3 6 9]] Comment More infoAdvertise with us Next Article Python | Numpy numpy.matrix.T() J Jitender_1998 Follow Improve Article Tags : Python Python-numpy Python numpy-Matrix Function Practice Tags : python Similar Reads numpy.asmatrix() in Python numpy.asmatrix(data, dtype = None) Returns a matrix by interpreting the input as a matrix. Parameters : data : array-like input data dtype : Data type of returned array Returns : Interprets the input as a matrix Python # Python Programming illustrating # numpy.asmatrix import numpy as geek # array-l 1 min read numpy.matrix() in Python This class returns a matrix from a string of data or array-like object. Matrix obtained is a specialised 2D array. Syntax : numpy.matrix(data, dtype = None) : Parameters : data : data needs to be array-like or string dtype : Data type of returned array. Returns : data interpreted as a matrix Python 1 min read Python | Numpy matrix.transpose() With the help of Numpy matrix.transpose() method, we can find the transpose of the matrix by using the matrix.transpose()method in Python. Numpy matrix.transpose() Syntax Syntax : matrix.transpose() Parameter: No parameters; transposes the matrix it is called on. Return : Return transposed matrix Wh 3 min read Python | Numpy numpy.transpose() With the help of Numpy numpy.transpose(), We can perform the simple function of transpose within one line by using numpy.transpose() method of Numpy. It can transpose the 2-D arrays on the other hand it has no effect on 1-D arrays. This method transpose the 2-D numpy array. Parameters: axes : [None, 2 min read NumPy Array in Python NumPy (Numerical Python) is a powerful library for numerical computations in Python. It is commonly referred to multidimensional container that holds the same data type. It is the core data structure of the NumPy library and is optimized for numerical and scientific computation in Python. Table of C 2 min read Like