We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When I execute the code,
using Polynomials p = Polynomial([NaN,NaN,NaN,NaN,NaN,NaN,NaN]) #p = Polynomial([NaN,NaN,NaN,NaN,NaN,NaN]) roots(p//p) poles(p//p)
I get the error
ERROR: BoundsError: attempt to access 0×0 Matrix{Float64} at index [1:1, 1] Stacktrace: [1] throw_boundserror(A::Matrix{Float64}, I::Tuple{UnitRange{Int64}, Int64}) @ Base .\essentials.jl:14 [2] checkbounds @ .\abstractarray.jl:699 [inlined] [3] view @ .\subarray.jl:214 [inlined] [4] evalJ!(J::Matrix{Float64}, zs::Vector{Float64}, ls::Vector{Int64}) @ Polynomials.Multroot USER.julia\packages\Polynomials\6i39P\src\polynomials\multroot.jl:335 [5] pejorative_root(p::Vector{Float64}, zs::Vector{Float64}, ls::Vector{Int64}; τ::Float64, maxsteps::Int64, verbose::Bool) @ Polynomials.Multroot USER.julia\packages\Polynomials\6i39P\src\polynomials\multroot.jl:275 [6] pejorative_root @ USER.julia\packages\Polynomials\6i39P\src\polynomials\multroot.jl:253 [inlined] [7] #pejorative_root#5 @ USER.julia\packages\Polynomials\6i39P\src\polynomials\multroot.jl:248 [inlined] [8] pejorative_root
but when I use only six NaN (the commented out p), I get a different error message
NaN
p
ERROR: ArgumentError: matrix contains Infs or NaNs Stacktrace: [1] chkfinite @ USER.julia\juliaup\julia-1.11.3+0.x64.w64.mingw32\share\julia\stdlib\v1.11\LinearAlgebra\src\lapack.jl:105 [inlined] [2] geevx!(balanc::Char, jobvl::Char, jobvr::Char, sense::Char, A::Matrix{Float64}) @ LinearAlgebra.LAPACK USER.julia\juliaup\julia-1.11.3+0.x64.w64.mingw32\share\julia\stdlib\v1.11\LinearAlgebra\src\lapack.jl:2129 [3] eigvals!(A::Matrix{Float64}; permute::Bool, scale::Bool, sortby::typeof(LinearAlgebra.eigsortby)) @ LinearAlgebra USER.julia\juliaup\julia-1.11.3+0.x64.w64.mingw32\share\julia\stdlib\v1.11\LinearAlgebra\src\eigen.jl:310 [4] eigvals! @ USER.julia\juliaup\julia-1.11.3+0.x64.w64.mingw32\share\julia\stdlib\v1.11\LinearAlgebra\src\eigen.jl:308 [inlined] [5] eigvals(A::Matrix{Float64}; kws::@kwargs{}) @ LinearAlgebra USER.julia\juliaup\julia-1.11.3+0.x64.w64.mingw32\share\julia\stdlib\v1.11\LinearAlgebra\src\eigen.jl:343 [6] eigvals @ USER.julia\juliaup\julia-1.11.3+0.x64.w64.mingw32\share\julia\stdlib\v1.11\LinearAlgebra\src\eigen.jl:343 [inlined] [7] roots(p::Polynomials.MutableDenseViewPolynomial{Polynomials.StandardBasis, Float64, :x}; kwargs::@kwargs{}) @ Polynomials USER.julia\packages\Polynomials\6i39P\src\polynomials\standard-basis\standard-basis.jl:499 [8] roots @ USER.julia\packages\Polynomials\6i39P\src\polynomials\standard-basis\standard-basis.jl:480 [inlined] [9] pejorative_manifold(p::Polynomial{Float64, :x}; method::Symbol, θ::Float64, ρ::Float64, ϕ::Int64, kwargs::@kwargs{}) @ Polynomials.Multroot USER.julia\packages\Polynomials\6i39P\src\polynomials\multroot.jl:160 [10] pejorative_manifold @ USER.julia\packages\Polynomials\6i39P\src\polynomials\multroot.jl:140 [inlined] [11] multroot(p::Polynomial{Float64, :x}; verbose::Bool, kwargs::@kwargs{}) @ Polynomials.Multroot USER.julia\packages\Polynomials\6i39P\src\polynomials\multroot.jl:114 [12] multroot @ USER.julia\packages\Polynomials\6i39P\src\polynomials\multroot.jl:101 [inlined] [13] #roots#185 @ USER.julia\packages\Polynomials\6i39P\src\rational-functions\common.jl:451 [inlined] [14] roots(pq::RationalFunction{Float64, :x, Polynomial{Float64, :x}}) @ Polynomials USER.julia\packages\Polynomials\6i39P\src\rational-functions\common.jl:448 [15] top-level scope @ PATH\juliaBugs\pol1.jl:6
I think, in the first case, there should come the same error message and not a BoundsError
The text was updated successfully, but these errors were encountered:
Thanks, I'll add a check and throw an ArgumentError.
ArgumentError
Sorry, something went wrong.
No branches or pull requests
When I execute the code,
I get the error
but when I use only six
NaN
(the commented outp
), I get a different error messageI think, in the first case, there should come the same error message and not a BoundsError
The text was updated successfully, but these errors were encountered: