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

convert from Zonotope to VPolytope fails due to inconsistent argument name #3317

Open
schillic opened this issue Apr 30, 2023 · 0 comments
Open
Labels
bug 🐛 Something isn't working

Comments

@schillic
Copy link
Member

schillic commented Apr 30, 2023

convert uses the name prune, but this particular vertices_list method expects the name apply_convex_hull. This is an argument for #1660.

julia> Z = rand(Zonotope)
Zonotope{Float64, Vector{Float64}, Matrix{Float64}}([0.28600000547971843, 0.33780737831741153], [-0.45138488890401973 0.9925166097583656 0.7855645481753909; -0.43529733151286754 0.0005006815897614299 -0.19271572818242222])

julia> convert(VPolytope, Z)
ERROR: MethodError: no method matching vertices_list(::Zonotope{Float64, Vector{Float64}, Matrix{Float64}}; prune=true)
Closest candidates are:
  vertices_list(::AbstractZonotope; apply_convex_hull) at ~/.julia/dev/LazySets/src/Interfaces/AbstractZonotope.jl:409 got unsupported keyword argument "prune"
  vertices_list(::AbstractPolyhedron; check_boundedness) at ~/.julia/dev/LazySets/src/Interfaces/AbstractPolyhedron_functions.jl:1035 got unsupported keyword argument "prune"
  vertices_list(::VPolytope) at ~/.julia/dev/LazySets/src/Sets/VPolytope.jl:406 got unsupported keyword argument "prune"
  ...
Stacktrace:
 [1] kwerr(::NamedTuple{(:prune,), Tuple{Bool}}, ::Function, ::Zonotope{Float64, Vector{Float64}, Matrix{Float64}})
   @ Base ./error.jl:165
 [2] convert(::Type{VPolytope}, X::Zonotope{Float64, Vector{Float64}, Matrix{Float64}}; prune::Bool)
   @ LazySets ~/.julia/dev/LazySets/src/convert.jl:187
 [3] convert(::Type{VPolytope}, X::Zonotope{Float64, Vector{Float64}, Matrix{Float64}})
   @ LazySets ~/.julia/dev/LazySets/src/convert.jl:186
 [4] top-level scope
   @ REPL[3]:1
@schillic schillic added the bug 🐛 Something isn't working label Apr 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant