Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backslash operator \ for tall Toeplitz matrices displays wrong error message #120

Open
mzaffalon opened this issue Nov 19, 2023 · 0 comments

Comments

@mzaffalon
Copy link

mzaffalon commented Nov 19, 2023

ToeplitzMatrices v0.8.2 gives the following error message on tall matrices:

julia> A = Toeplitz(1:4, [1.0,0,0])
4×3 Toeplitz{Float64, Vector{Float64}, Vector{Float64}}:
 1.0  0.0  0.0
 2.0  1.0  0.0
 3.0  2.0  1.0
 4.0  3.0  2.0

julia> A\randn(4)
ERROR: DimensionMismatch: second dimension of A, 3, does not match length of x, 4
Stacktrace:
 [1] mul!(y::Vector{Float64}, A::Toeplitz{Float64, Vector{Float64}, Vector{Float64}}, x::Vector{Float64}, α::Float64, β::Float64)
   @ ToeplitzMatrices C:\Users\michele.zaffalon\.julia\packages\ToeplitzMatrices\uvasQ\src\linearalgebra.jl:14
 [2] cgs(A::Toeplitz{Float64, Vector{Float64}, Vector{Float64}}, x::Vector{Float64}, b::Vector{Float64}, M::ToeplitzMatrices.ToeplitzFactorization{Float64, ToeplitzMatrices.Circulant{Float64, Vector{Float64}}, ComplexF64, FFTW.cFFTWPlan{ComplexF64, -1, true, 1, Tuple{Int64}}}, max_it::Int64, tol::Float64)
   @ ToeplitzMatrices.IterativeLinearSolvers C:\Users\michele.zaffalon\.julia\packages\ToeplitzMatrices\uvasQ\src\iterativeLinearSolvers.jl:150
<snip> 

julia> Float64.(A)\randn(4)
3-element Vector{Float64}:
  0.47506079964203446
 -0.6631620446434979
 -0.12761857223813952

Maybe a not implemented error method or an implicit conversion to Float64 would be better.

@mzaffalon mzaffalon changed the title \ for tall matrix displays wrong error message backslash operator \ for tall matrix displays wrong error message Nov 19, 2023
@mzaffalon mzaffalon changed the title backslash operator \ for tall matrix displays wrong error message backslash operator \ for tall matrices displays wrong error message Nov 19, 2023
@mzaffalon mzaffalon changed the title backslash operator \ for tall matrices displays wrong error message backslash operator \ for tall Toeplitz matrices displays wrong error message Nov 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant