Skip to content

Unable to invert Toeplitz matrices #70

@ParadaCarleton

Description

@ParadaCarleton
julia> using FFTW

julia> using ToeplitzMatrices

julia> y = SymmetricToeplitz([1, 2, 3])
3×3 SymmetricToeplitz{Int64}:
 1  2  3
 2  1  2
 3  2  1

julia> inv(y)
ERROR: MethodError: no method matching ldiv!(::ToeplitzMatrices.ToeplitzFactorization{Float64, SymmetricToeplitz{Float64}, ComplexF64, FFTW.cFFTWPlan{ComplexF64, -1, true, 1, UnitRange{Int64}}}, ::Matrix{Float64})
Closest candidates are:
  ldiv!(::Any, ::ChainRulesCore.AbstractThunk) at ~/.julia/packages/ChainRulesCore/ctmSK/src/tangent_types/thunks.jl:90
  ldiv!(::LinearAlgebra.SymTridiagonal, ::AbstractVecOrMat; shift) at /usr/share/julia/stdlib/v1.8/LinearAlgebra/src/tridiag.jl:280
  ldiv!(::LinearAlgebra.Diagonal, ::AbstractVecOrMat) at /usr/share/julia/stdlib/v1.8/LinearAlgebra/src/diagonal.jl:425
  ...
Stacktrace:
 [1] inv(A::SymmetricToeplitz{Int64})
   @ LinearAlgebra /usr/share/julia/stdlib/v1.8/LinearAlgebra/src/generic.jl:1039
 [2] top-level scope
   @ REPL[6]:1

This is pretty weird; inversion should be able to fall back on the generic algorithm, even if the Toeplitz-specific algorithms haven't been implemented yet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions