jax.scipy.linalg.hessenberg#

jax.scipy.linalg.hessenberg(a: ArrayLike, *, calc_q: Literal[False], overwrite_a: bool = 'False', check_finite: bool = 'True') Array[source]#
jax.scipy.linalg.hessenberg(a: ArrayLike, *, calc_q: Literal[True], overwrite_a: bool = 'False', check_finite: bool = 'True') Tuple[Array, Array]

Compute Hessenberg form of a matrix.

LAX-backend implementation of scipy.linalg._decomp.hessenberg().

Does not support the Scipy argument check_finite=True, because compiled JAX code cannot perform checks of array values at runtime.

Does not support the Scipy argument overwrite_*=True.

Original docstring below.

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.

Return type

Union[Array, Tuple[Array, Array]]

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.