Python | Numpy numpy.matrix.A() Last Updated : 08 Apr, 2019 Comments Improve Suggest changes Like Article Like Report With the help of Numpy numpy.matrix.A() method, we can get the same matrix as self. It means through this method we can get the identical matrix. Syntax : numpy.matrix.A() Return : Return self matrix Example #1 : In this example we can see that with the help of matrix.A() method, we are able to get the self 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.A() method geeks = gfg.getA() 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.A() method geeks = gfg.getA() print(geeks) Output: [[1 2 3] [4 5 6] [7 8 9]] Comment More infoAdvertise with us Next Article Python | Numpy numpy.matrix.A() 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 numpy.ndarray.__imul__() With the help of numpy.ndarray.__imul__() method, we can multiply a particular value that is provided as a parameter in the ndarray.__imul__() method. Value will be multiplied to every element in a numpy array. Syntax: ndarray.__imul__($self, value, /)Return: self*=value Example #1 : In this example 1 min read numpy.multiply() in Python The numpy.multiply() is a numpy function in Python which is used to find element-wise multiplication of two arrays or scalar (single value). It returns the product of two input array element by element.Syntax:numpy.multiply(arr1, arr2, out=None, where=True, casting='same_kind', order='K', dtype=None 3 min read numpy.matrix.A() function - Python numpy.matrix.A() function return self as an ndarray object. Syntax : numpy.matrix.A() Parameters : None Return : [ndarray] Return self as an ndarray. Code #1 : Python3 # Python program explaining # numpy.matrix.A() function # importing numpy as geek import numpy as geek mat = geek.matrix(geek.arange 1 min read numpy.asarray() in Python numpy.asarray()function is used when we want to convert input to an array. Input can be lists, lists of tuples, tuples, tuples of tuples, tuples of lists and arrays. Syntax : numpy.asarray(arr, dtype=None, order=None) Parameters : arr : [array_like] Input data, in any form that can be converted to a 2 min read numpy.alen() in Python numpy.alen() function is used to return the length of the first dimension of the input array. Syntax : numpy.alen(arr) Parameters : arr : [array_like] Input array. Return : [int]Length of the first dimension of arr. Code #1 : Python3 # Python program explaining # alen() function import numpy as geek 1 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 numpy.eye() in Python numpy.eye() is a function in the NumPy library that creates a 2D array with ones on the diagonal and zeros elsewhere. This function is often used to generate identity matrices with ones along the diagonal and zeros in all other positions.Let's understand with the help of an example:Pythonimport nump 2 min read Numpy matrix.I function | Python With the help ofnumpy.matrix.I() function we can get the multiplicative inverse of the same size as of our given matrix. Syntax : numpy.matrix.I() Return : [matrix object] If self is non-singular, ret is such that ret * self == self * ret == np.matrix(np.eye(self[0, :].size) all return True. Return 1 min read Like