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

JET: MethodError for zero polynomial #28

Open
fkastner opened this issue Dec 5, 2023 · 0 comments
Open

JET: MethodError for zero polynomial #28

fkastner opened this issue Dec 5, 2023 · 0 comments

Comments

@fkastner
Copy link

fkastner commented Dec 5, 2023

Complaint from JET.jl:

roots(poly::Vector{Int64}) @ PolynomialRoots /src/PolynomialRoots.jl:610
│┌ roots(poly::Vector{Int64}; epsilon::Float64, polish::Bool) @ PolynomialRoots /src/PolynomialRoots.jl:617
││ no matching method found `(::Colon)(::Int64, ::Nothing)` (1/2 union split): (1 PolynomialRoots.:(:) last_nz::Union{Nothing, Int64})
│└────────────────────

So Line 617 errors with a MethodError for ::Colon if the input vector has no nonzero element.

MWE:

using PolynomialRoots
roots([0,0,0])
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