Skip to main content

subspace_angles

Function subspace_angles 

Source
pub fn subspace_angles<T: Scalar, S: Data<Elem = T>, S2: Data<Elem = T>>(
    a: &ArrayBase<S, Ix2>,
    b: &ArrayBase<S2, Ix2>,
) -> Result<Array1<f64>>
Expand description

The principal angles between the column spaces of A and B (SciPy’s subspace_angles), largest first. With orthonormal bases Q_A, Q_B, the cosines are the singular values of Q_Aᴴ Q_B; angles whose cosine exceeds 1/√2 are taken instead from the sines, the singular values of Q_B − Q_A Q_Aᴴ Q_B, which keeps small angles accurate (Knyazev and Argentati, 2002).