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

MethodError: no method matching SymTridiagonal(::Array{Irrational{:π},1}, ::Array{Float64,1}) #40211

Open
schneiderfelipe opened this issue Mar 26, 2021 · 0 comments

Comments

@schneiderfelipe
Copy link
Contributor

schneiderfelipe commented Mar 26, 2021

SymTridiagonal does not accept Array{Irrational{:π},1}:

julia> using LinearAlgebra

julia> SymTridiagonal(fill(π, 3), zeros(2))
ERROR: MethodError: no method matching SymTridiagonal(::Array{Irrational{:π},1}, ::Array{Float64,1})
Closest candidates are:
  SymTridiagonal(::V, ::V) where {T, V<:AbstractArray{T,1}} at /build/julia-98cBbp/julia-1.4.1+dfsg/usr/share/julia/stdlib/v1.4/LinearAlgebra/src/tridiag.jl:49
Stacktrace:
 [1] top-level scope at REPL[11]:1

julia> SymTridiagonal(fill(float(π), 3), zeros(2))
3×3 SymTridiagonal{Float64,Array{Float64,1}}:
 3.14159  0.0       ⋅ 
 0.0      3.14159  0.0
  ⋅       0.0      3.14159

julia> versioninfo()
Julia Version 1.4.1
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: AMD Ryzen 5 1600 Six-Core Processor
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-8.0.1 (ORCJIT, znver1)
Environment:
  JULIA_NUM_THREADS = 12

(EDIT: Found while testing for #40194.)

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