Skip to main content

logm

Function logm 

Source
pub fn logm<T: Scalar, S: Data<Elem = T>>(
    a: &ArrayBase<S, Ix2>,
) -> Result<Array2<Complex<f64>>>
Expand description

The principal logarithm L with e^L = A and eigenvalues with imaginary parts in (−π, π) (SciPy’s logm), by the inverse scaling and squaring method on the Schur form: take square roots of T until ‖T − I‖₁ ≤ 0.25 (k times), evaluate log(I + X) by the [8/8] Padé approximant written as Gauss-Legendre quadrature, Σ wⱼ X (I + xⱼ X)⁻¹, and multiply by 2ᵏ.