-
Notifications
You must be signed in to change notification settings - Fork 152
Open
Description
The inverse of a Triangular SMatrix does not preserve type. The resulting triangular is based on Matrix not SMatrix because the fallback method is hard-coded to Matrix. It seems like this should be a new method in StaticArrays.jl rather than something in new Base since it'll probably need to use inv() instead of ldiv!().
using LinearAlgebra, StaticArrays
a = rand(SMatrix{3,3})
ua = UpperTriangular(a)
la = LowerTriangular(a)
typeof(inv(ua)) == typeof(ua) # false UpperTriangular{Float64, Matrix{Float64}}
typeof(inv(la)) == typeof(la) # false LowerTriangular{Float64, Matrix{Float64}}RomeoV
Metadata
Metadata
Assignees
Labels
No labels