Python | Numpy numpy.matrix.H() (original) (raw)
Last Updated : 08 Apr, 2019
With the help of **Numpy numpy.matrix.H()**
method, we can make a conjugate Transpose of any complex matrix either having dimension one or more than more.
Syntax :
numpy.matrix.H()
Return : Return conjugate transpose of every complex matrix
Example #1 :
In this example we can see that with the help of matrix.H()
method, we are able to transform any type of complex matrix.
import
numpy as np
gfg
=
np.matrix([
1
-
2j
,
3
-
4j
])
geeks
=
gfg.getH()
print
(geeks)
Output:
[[ 1.+2.j] [ 3.+4.j]]
Example #2 :
import
numpy as np
gfg
=
np.matrix([[
1
-
5j
,
2
+
5j
,
3
-
3j
], [
4
+
6j
,
5
-
8j
,
6
-
2j
], [
7
+
6j
,
8
-
6j
,
9
+
1.j
]])
geeks
=
gfg.getH()
print
(geeks)
Output:
[[ 1.+5.j 4.-6.j 7.-6.j] [ 2.-5.j 5.+8.j 8.+6.j] [ 3.+3.j 6.+2.j 9.-1.j]]
Similar Reads
- Python | Numpy numpy.matrix.A() 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 1 min read
- Python | Numpy numpy.matrix.T() 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 tra 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 # Pytho 1 min read
- 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 Programming illustrating # numpy.asmatrix import numpy as geek # array-like inp 1 min read
- numpy.bmat() in Python numpy.bmat(obj, l_dict = None, g_dict = None) : Return specialised 2-D matrix from nested objects that can be string-like or array-like. Parameters : object : array-like or string l_dict : (dict, optional) replaces local operands, A dictionary that replaces local operands in current frame g_dict : ( 2 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
- Python | Numpy matrix.sum() With the help of matrix.sum() method, we are able to find the sum of values in a matrix by using the same method. Syntax : matrix.sum() Return : Return sum of values in a matrix Example #1 : In this example we are able to find the sum of values in a matrix by using matrix.sum() method. # import the 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=No 3 min read
- Python | Numpy matrix.take() With the help of Numpy matrix.take() method, we can select the elements from a given matrix by passing the parameter as index value of that element. It will return a matrix having one dimension. Remember it will work for one axis at a time. Syntax : matrix.take(index, axis) Return : Return matrix of 1 min read
- Python | Numpy matrix.resize() With the help of Numpy matrix.resize() method, we are able to resize the shape of the given matrix. Remember all elements should be covered after resizing the given matrix. Syntax : matrix.resize(shape) Return: new resized matrix Example #1 : In the given example we are able to resize the given matr 1 min read