Skip to content

Commit 857f5f7

Browse files
authored
size -> axes (#262)
1 parent 0e15d79 commit 857f5f7

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/Certificate/Symmetry/wedderburn.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ function _gram_basis(pattern::Pattern, basis, ::Type{T}) where {T}
135135
if !all(is_orthogonal, S)
136136
R = orthogonalize(R)
137137
S = matrix_reps(pattern, R, basis, T, _OrthogonalMatrix())
138-
for i in 1:size(R, 1)
138+
for i in axes(R, 1)
139139
R[i, :] = LinearAlgebra.normalize(R[i, :])
140140
end
141141
S = matrix_reps(pattern, R, basis, T, _OrthogonalMatrix())

src/sosdec.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ function SOSDecomposition(p::GramMatrix, ranktol=0.0,
4444
# TODO LDL^T factorization for SDP is missing in Julia
4545
# it would be nice to have though
4646
nM, cM, Q = MultivariateMoments.lowrankchol(Matrix(getmat(p)), dec, ranktol)
47-
ps = [MP.polynomial(Q[i,:], p.basis) for i in 1:size(Q, 1)]
47+
ps = [MP.polynomial(Q[i,:], p.basis) for i in axes(Q, 1)]
4848
return SOSDecomposition(ps)
4949
end
5050
# Without LDL^T, we need to do float(T)

test/ceg_test.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ end
127127
@test CEG.add_node!(G, 1) == 1
128128
@test CEG.add_edge!(G, (1, 2)) == (1, 2)
129129
@test CEG.add_edge!.(G, [(1, 2), (2, 3)]) isa Vector{Tuple{Int, Int}}
130-
@test CEG.add_clique!(G, [1, 2, 3]) == nothing
130+
@test CEG.add_clique!(G, [1, 2, 3]) === nothing
131131
end
132132

133133
@testset "show" begin

test/symmetry.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function test_linsolve()
1414
b = A' * x
1515
@test Certificate.Symmetry._linsolve(A, b, Symmetry._RowEchelonMatrix()) x
1616
B = float.(A)
17-
for i in 1:size(B, 1)
17+
for i in axes(B, 1)
1818
B[i, :] = normalize(B[i, :])
1919
end
2020
b = B' * x

0 commit comments

Comments
 (0)