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

NamedTuple switch broke add_default_options #1041

Closed
blegat opened this issue May 4, 2023 · 1 comment
Closed

NamedTuple switch broke add_default_options #1041

blegat opened this issue May 4, 2023 · 1 comment

Comments

@blegat
Copy link
Contributor

blegat commented May 4, 2023

The change in #1026 broke the following function:

function add_default_opts!(opts::Dict{Symbol, Any}, method::AbstractOptimizer)
for newopt in default_options(method)
if !haskey(opts, newopt[1])
opts[newopt[1]] = newopt[2]
end
end
end

because iterating over a NamedTuple doesn't give pairs like a Dict.
This broke the tests for #929 (so if this PR had been merged, it would have detected the failure 😇 )

@pkofod
Copy link
Member

pkofod commented Jun 12, 2023

Fixed, thank you .

@pkofod pkofod closed this as completed Jun 12, 2023
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

2 participants