naginterfaces.library.matop.complex_​gen_​matrix_​fun_​num

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

complex_gen_matrix_fun_num computes the matrix function, , of a complex matrix . Numerical differentiation is used to evaluate the derivatives of when they are required.

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

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

Parameters
acomplex, array-like, shape

The matrix .

fcallable fz = f(z, data=None)

The function evaluates at a number of points .

Parameters
zcomplex, ndarray, shape

The points at which the function is to be evaluated.

dataarbitrary, optional, modifiable in place

User-communication data for callback functions.

Returns
fzcomplex, array-like, shape

The function values. should return the value , for .

dataarbitrary, optional

User-communication data for callback functions.

Returns
acomplex, ndarray, shape

The matrix, .

Raises
NagValueError
(errno )

On entry, .

Constraint: .

(errno )

A Taylor series failed to converge after terms. Further Taylor series coefficients can no longer reliably be obtained by numerical differentiation.

(errno )

There was an error whilst reordering the Schur form of .

Note: this failure should not occur and suggests that the function has been called incorrectly.

(errno )

The function was unable to compute the Schur decomposition of .

Note: this failure should not occur and suggests that the function has been called incorrectly.

(errno )

An unexpected internal error occurred. Please contact NAG.

Warns
NagCallbackTerminateWarning
(errno )

Termination requested in .

Notes

is computed using the Schur–Parlett algorithm described in Higham (2008) and Davies and Higham (2003). The coefficients of the Taylor series used in the algorithm are evaluated using the numerical differentiation algorithm of Lyness and Moler (1967).

The scalar function is supplied via function which evaluates at a number of points .

References

Davies, P I and Higham, N J, 2003, A Schur–Parlett algorithm for computing matrix functions, SIAM J. Matrix Anal. Appl. (25(2)), 464–485

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

Lyness, J N and Moler, C B, 1967, Numerical differentiation of analytic functions, SIAM J. Numer. Anal. (4(2)), 202–210