AnsMat#

class ansys.mapdl.core.math.AnsMat(id_, mapdl, type_=ObjType.DMAT)[source]#

APDLMath Matrix Object

Methods

AnsMat.asarray([dtype])

Returns vector as a numpy array.

AnsMat.axpy(op, val1, val2)

Perform the matrix operation: M2= v*M1 + w*M2

AnsMat.const(value)

Set all values of the vector to a constant

AnsMat.copy()

Returns the name of the copy of this object

AnsMat.dot(obj)

Perform the matrix multiplication by another vector or matrix.

AnsMat.kron(obj)

Calculates the Kronecker product of two matrices/vectors

AnsMat.norm([nrmtype])

Matrix or vector norm.

AnsMat.ones()

Set all values of the vector to one

AnsMat.rand()

Set all values of the vector to a random number

AnsMat.sym()

Return if matrix is symmetric.

AnsMat.zeros()

Set all values of the vector to zero

Attributes

AnsMat.T

Returns the transpose of a MAPDL matrix.

AnsMat.ncol

Number of rows in this matrix.

AnsMat.nrow

Number of columns in this matrix.

AnsMat.shape

Returns a numpy-like shape.

AnsMat.size

Number of items in this matrix.