naginterfaces.library.matop.real_​symm_​matrix_​fun

naginterfaces.library.matop.real_symm_matrix_fun(uplo, a, f, data=None)[source]

real_symm_matrix_fun computes the matrix function, , of a real symmetric matrix . must also be a real symmetric matrix.

For full information please refer to the NAG Library document for f01ef

https://support.nag.com/numeric/nl/nagdoc_30.2/flhtml/f01/f01eff.html

Parameters
uplostr, length 1

If , the upper triangle of the matrix is stored.

If , the lower triangle of the matrix is stored.

afloat, array-like, shape

The symmetric matrix .

fcallable fx = f(x, data=None)

The function evaluates at a number of points .

Parameters
xfloat, ndarray, shape

The points at which the function is to be evaluated.

dataarbitrary, optional, modifiable in place

User-communication data for callback functions.

Returns
fxfloat, array-like, shape

The function values. should return the value , for .

dataarbitrary, optional

User-communication data for callback functions.

Returns
afloat, ndarray, shape

If no exception or warning is raised, the upper or lower triangular part of the matrix function, .

Raises
NagValueError
(errno )

An internal error occurred when computing the spectral factorization. Please contact NAG.

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: or .

(errno )

The computation of the spectral factorization failed to converge.

Warns
NagCallbackTerminateWarning
(errno )

Termination requested in .

Notes

is computed using a spectral factorization of

where is the diagonal matrix whose diagonal elements, , are the eigenvalues of , and is an orthogonal matrix whose columns are the eigenvectors of . is then given by

where is the diagonal matrix whose th diagonal element is . See for example Section 4.5 of Higham (2008). is assumed to be real.

References

Higham, N J, 2008, Functions of Matrices: Theory and Computation, SIAM, Philadelphia, PA, USA