Skip to content

Inverse of symmetric static arrays returns errors #955

Open
@Boxylmer

Description

@Boxylmer

MWE:

using LinearAlgebra
using StaticArrays

my_matrix = [
    23.839174539658693 243552.4933521217 1.8416855269559405e9 7262.007338486136 -0.15093214378094674 -0.08311979038696746; 
    243552.4933521217 2.962601669841655e9 1.565059094802e13 7.454589007612145e7 -1822.7229289215243 -703.6834309479851; 
    1.8416855269559405e9 1.565059094802e13 1.852842171814476e17 5.52741246224e11 -9.820212598493524e6 -8.437622282150278e6; 
    7262.007338486136 7.454589007612145e7 5.52741246224e11 2.214925230782032e6 -46.13837676487657 -24.926993518175713; 
    -0.15093214378094674 -1822.7229289215243 -9.820212598493524e6 -46.13837676487657 0.0011236787686097864 0.00044192488231854755; 
    -0.08311979038696746 -703.6834309479851 -8.437622282150278e6 -24.926993518175713 0.00044192488231854755 0.0003843024068388386
    ]
my_static_matrix = @SMatrix[
    23.839174539658693 243552.4933521217 1.8416855269559405e9 7262.007338486136 -0.15093214378094674 -0.08311979038696746; 
    243552.4933521217 2.962601669841655e9 1.565059094802e13 7.454589007612145e7 -1822.7229289215243 -703.6834309479851; 
    1.8416855269559405e9 1.565059094802e13 1.852842171814476e17 5.52741246224e11 -9.820212598493524e6 -8.437622282150278e6; 
    7262.007338486136 7.454589007612145e7 5.52741246224e11 2.214925230782032e6 -46.13837676487657 -24.926993518175713; 
    -0.15093214378094674 -1822.7229289215243 -9.820212598493524e6 -46.13837676487657 0.0011236787686097864 0.00044192488231854755; 
    -0.08311979038696746 -703.6834309479851 -8.437622282150278e6 -24.926993518175713 0.00044192488231854755 0.0003843024068388386
    ]

my_symmetric_matrix = Symmetric(my_matrix)
my_symmetric_static_matrix = Symmetric(my_static_matrix)

myinversion = inv(my_symmetric_matrix)
mystaticinversion = inv(my_symmetric_static_matrix)

Returns

ERROR: LoadError: MethodError: no method matching bunchkaufman!(::Symmetric{Float64, SMatrix{6, 6, Float64, 36}}, ::Bool; check=true)

On Julia 1.6.0

Apologies for the unnecessarily large matrix, I'm copying this from some work I was originally trying to do for a model I'm getting the covariance matric of through the inverse Hessian.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions