AnsMat#

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

Provides the AnsMath matrix objects.

Methods

AnsMat.asarray([dtype])

Return the matrix as a NumPy array.

AnsMat.axpy(obj, val1, val2)

Perform the matrix operation: self= val1*obj + val2*self.

AnsMat.const(value)

Set all values of the object to a constant.

AnsMat.copy()

Get the name of the copy of this object.

AnsMat.dot(obj)

Multiply the AnsMath object by another AnsMath object.

AnsMat.kron(obj)

Calculates the Kronecker product of two matrices/vectors

AnsMat.norm([nrmtype])

Return the norm of the AnsMath object.

AnsMat.ones()

Set all values of the object to one.

AnsMat.rand()

Set all values of the object to a random number.

AnsMat.sym()

Return if the matrix is symmetric.

AnsMat.zeros()

Set all values of the object to zero.

Attributes

AnsMat.T

Transposition of an AnsMath matrix.

AnsMat.ncol

Number of rows in the matrix.

AnsMat.nrow

Number of columns in the matrix.

AnsMat.shape

NumPy-like shape.

AnsMat.size

Number of items in the matrix.