scipy 1.8.0 Pypi GitHub Homepage
Other Docs
ParametersReturnsBackRef
hessenberg(a, calc_q=False, overwrite_a=False, check_finite=True)

The Hessenberg decomposition is:

A = Q H Q^H

where Q is unitary/orthogonal and H has only zero elements below the first sub-diagonal.

Parameters

a : (M, M) array_like

Matrix to bring into Hessenberg form.

calc_q : bool, optional

Whether to compute the transformation matrix. Default is False.

overwrite_a : bool, optional

Whether to overwrite a; may improve performance. Default is False.

check_finite : bool, optional

Whether to check that the input matrix contains only finite numbers. Disabling may give a performance gain, but may result in problems (crashes, non-termination) if the inputs do contain infinities or NaNs.

Returns

H : (M, M) ndarray

Hessenberg form of a.

Q : (M, M) ndarray

Unitary/orthogonal similarity transformation matrix A = Q H Q^H . Only returned if calc_q=True .

Compute Hessenberg form of a matrix.

Examples

>>> from scipy.linalg import hessenberg
... A = np.array([[2, 5, 8, 7], [5, 2, 2, 8], [7, 5, 6, 6], [5, 4, 4, 8]])
... H, Q = hessenberg(A, calc_q=True)
... H array([[ 2. , -11.65843866, 1.42005301, 0.25349066], [ -9.94987437, 14.53535354, -5.31022304, 2.43081618], [ 0. , -1.83299243, 0.38969961, -0.51527034], [ 0. , 0. , -3.83189513, 1.07494686]])
>>> np.allclose(Q @ H @ Q.conj().T - A, np.zeros((4, 4)))
True
See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

scipy.linalg._decomp.hessenberg

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /scipy/linalg/_decomp.py#1359
type: <class 'function'>
Commit: