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

Small fix for OptionSet creation #482

Merged
merged 2 commits into from
Apr 16, 2024
Merged

Small fix for OptionSet creation #482

merged 2 commits into from
Apr 16, 2024

Conversation

alexej-jordan
Copy link
Collaborator

The implicit conversion failed for a Polymake.Vector{Float64}, which can be used during visualization. This PR only introduces a small change to fix this: we now convert the value to a PolymakeType before calling option_set_take.

@benlorenz

Copy link
Member

@benlorenz benlorenz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that is reasonable, especially since we do the same when passing normal arguments to polymake functions.

For Polymake.Vector{Float64} this should not be necessary, it does make sense for a julia vector though. Can you add a small test?

Something like this should work with this change and fail without:

@test Polymake.OptionSet(Dict(:asdf=>[1,2,3])) isa Polymake.OptionSet

Edit: The CI failures seem unrelated and are an issue with the caching that should get better once #481 is merged.

@benlorenz benlorenz merged commit 526521b into master Apr 16, 2024
17 of 21 checks passed
@benlorenz benlorenz deleted the aj/optionset-convert branch April 27, 2024 14:51
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

Successfully merging this pull request may close these issues.

2 participants