factorize#

AnsMath.factorize(mat, algo=None, inplace=True)#

Factorize a matrix.

Parameters:
matAnsMat

AnsMath matrix.

algostr, optional

Factorization algorithm. Options are "LAPACK" and "DSP". The default is "LAPACK" for dense matrices and "DSP" for sparse matrices.

inplacebool, optional

Whether the factorization is performed on the input matrix rather than on a copy of this matrix. Performing factorization on a copy of this matrix would result in no changes to the input matrix. The default is True.

Returns:
AnsSolver

Ansys Solver object.

Examples

Factorize a random matrix.

>>> dim = 1000
>>> m2 = mm.rand(dim, dim)
>>> m3 = m2.copy()
>>> mat = mm.factorize(m2)