ComplexMatrix¶
-
class
ComplexMatrix
(*args)¶ Complex Matrix.
- Available constructors:
ComplexMatrix(nr, nc)
ComplexMatrix(nr, nc, values)
- Parameters
- nrinteger
The number of rows of the complex matrix.
- ncinteger
The number of columns of the complex matrix.
- valuessequence of complex number
The sequence must have elements. It might be a
ComplexCollection
or aScalarCollection
. Default is (0, 0).
See also
Examples
>>> import openturns as ot >>> m = ot.ComplexMatrix(2, 2, [1+2j, 3+4j , 5+6j, 7+8j]) >>> print(m) [[ (1,2) (5,6) ] [ (3,4) (7,8) ]] >>> m = ot.ComplexMatrix(2, 3, range(2*3)) >>> print(m) [[ (0,0) (2,0) (4,0) ] [ (1,0) (3,0) (5,0) ]]
Create a matrix from a numpy array:
>>> import numpy as np >>> array = np.array([[1, 2], [3, 4], [5, 6]]) >>> m = ot.ComplexMatrix(array) >>> print(m) [[ (1,0) (2,0) ] [ (3,0) (4,0) ] [ (5,0) (6,0) ]]
Methods
clean
(self, threshold)Clean the matrix according to a specific threshold.
conjugate
(self)Accessor to the conjugate complex matrix.
conjugateTranspose
(self)Accessor to the transposed conjugate complex matrix.
getClassName
(self)Accessor to the object’s name.
getId
(self)Accessor to the object’s id.
getImplementation
(self)Accessor to the underlying implementation.
getName
(self)Accessor to the object’s name.
getNbColumns
(self)Accessor to the number of columns.
getNbRows
(self)Accessor to the number of rows.
imag
(self)Accessor to the imaginary part.
isEmpty
(self)Test whether the matrix is empty or not.
real
(self)Accessor to the real part.
setName
(self, name)Accessor to the object’s name.
transpose
(self)Accessor to the transposed complex matrix.
solveLinearSystem
-
__init__
(self, \*args)¶ Initialize self. See help(type(self)) for accurate signature.
-
clean
(self, threshold)¶ Clean the matrix according to a specific threshold.
- Parameters
- thresholdpositive float
Numerical sample which is the collection of points stored by the history strategy.
-
conjugate
(self)¶ Accessor to the conjugate complex matrix.
- Returns
- N
ComplexMatrix
The conjugate matrix of size associated with the given complex matrix such as .
- N
-
conjugateTranspose
(self)¶ Accessor to the transposed conjugate complex matrix.
- Returns
- N
ComplexMatrix
The transposed conjugate matrix of size associated with the given complex matrix such as .
- N
-
getClassName
(self)¶ Accessor to the object’s name.
- Returns
- class_namestr
The object class name (object.__class__.__name__).
-
getId
(self)¶ Accessor to the object’s id.
- Returns
- idint
Internal unique identifier.
-
getImplementation
(self)¶ Accessor to the underlying implementation.
- Returns
- implImplementation
The implementation class.
-
getName
(self)¶ Accessor to the object’s name.
- Returns
- namestr
The name of the object.
-
getNbColumns
(self)¶ Accessor to the number of columns.
- Returns
- ncinteger
The number of columns of .
-
getNbRows
(self)¶ Accessor to the number of rows.
- Returns
- nrinteger
The number of rows of .
-
isEmpty
(self)¶ Test whether the matrix is empty or not.
- Returns
- isEmptybool
Flag telling whether the dimensions of the matrix is zero.
-
setName
(self, name)¶ Accessor to the object’s name.
- Parameters
- namestr
The name of the object.
-
transpose
(self)¶ Accessor to the transposed complex matrix.
- Returns
- N
ComplexMatrix
The transposed matrix of size associated with the given complex matrix such as .
- N