Skip to content

Commit

Permalink
size -> axes (#262)
Browse files Browse the repository at this point in the history
  • Loading branch information
blegat authored Oct 7, 2022
1 parent 0e15d79 commit 857f5f7
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Certificate/Symmetry/wedderburn.jl
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ function _gram_basis(pattern::Pattern, basis, ::Type{T}) where {T}
if !all(is_orthogonal, S)
R = orthogonalize(R)
S = matrix_reps(pattern, R, basis, T, _OrthogonalMatrix())
for i in 1:size(R, 1)
for i in axes(R, 1)
R[i, :] = LinearAlgebra.normalize(R[i, :])
end
S = matrix_reps(pattern, R, basis, T, _OrthogonalMatrix())
Expand Down
2 changes: 1 addition & 1 deletion src/sosdec.jl
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function SOSDecomposition(p::GramMatrix, ranktol=0.0,
# TODO LDL^T factorization for SDP is missing in Julia
# it would be nice to have though
nM, cM, Q = MultivariateMoments.lowrankchol(Matrix(getmat(p)), dec, ranktol)
ps = [MP.polynomial(Q[i,:], p.basis) for i in 1:size(Q, 1)]
ps = [MP.polynomial(Q[i,:], p.basis) for i in axes(Q, 1)]
return SOSDecomposition(ps)
end
# Without LDL^T, we need to do float(T)
Expand Down
2 changes: 1 addition & 1 deletion test/ceg_test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ end
@test CEG.add_node!(G, 1) == 1
@test CEG.add_edge!(G, (1, 2)) == (1, 2)
@test CEG.add_edge!.(G, [(1, 2), (2, 3)]) isa Vector{Tuple{Int, Int}}
@test CEG.add_clique!(G, [1, 2, 3]) == nothing
@test CEG.add_clique!(G, [1, 2, 3]) === nothing
end

@testset "show" begin
Expand Down
2 changes: 1 addition & 1 deletion test/symmetry.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function test_linsolve()
b = A' * x
@test Certificate.Symmetry._linsolve(A, b, Symmetry._RowEchelonMatrix()) x
B = float.(A)
for i in 1:size(B, 1)
for i in axes(B, 1)
B[i, :] = normalize(B[i, :])
end
b = B' * x
Expand Down

0 comments on commit 857f5f7

Please sign in to comment.