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

reshape birkhoff vector #390

Merged
merged 3 commits into from
Jul 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/polytope_oracles.jl
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ function compute_extreme_point(
) where {T}
nsq = length(direction)
n = isqrt(nsq)
return compute_extreme_point(lmo, reshape(direction, n, n); kwargs...)
return compute_extreme_point(lmo, reshape(direction, n, n); kwargs...)[:]
end

function convert_mathopt(
Expand Down
2 changes: 1 addition & 1 deletion test/lmo.jl
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ end
res = FrankWolfe.compute_extreme_point(lmo, cost)
_is_doubly_stochastic(res)
res2 = FrankWolfe.compute_extreme_point(lmo, vec(cost))
@test res ≈ res2
@test vec(res) ≈ res2
end
cost_mat = [
2 3 3
Expand Down
Loading