Reduces a square matrix to upper Hessenberg form.

Currently implemented on CPU only.


a (Union[Array, ndarray, bool_, number, bool, int, float, complex]) – A floating point or complex square matrix or batch of matrices.

Returns: A (a, taus) pair, where the upper triangle and first subdiagonal of a contain the upper Hessenberg matrix, and the elements below the first subdiagonal contain the Householder reflectors. For each Householder reflector taus contains the scalar factors of the elementary Householder reflectors.

Return type

Tuple[Array, Array]