Skip to content

Commit ed51793

Browse files
Sacha0andreasnoack
authored andcommitted
Eliminate uses of full from test/sparse/[spqr|cholmod|sparse].jl. (#23888)
1 parent c240439 commit ed51793

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

test/sparse/cholmod.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -728,20 +728,20 @@ for F in (cholfact(AtA), cholfact(AtA, perm=1:5), ldltfact(AtA), ldltfact(AtA, p
728728

729729
#Test update
730730
F11 = CHOLMOD.lowrankupdate(F1, C)
731-
@test full(sparse(F11)) AtA+C*C'
731+
@test Array(sparse(F11)) AtA+C*C'
732732
@test F11\ones(5) B
733733
#Make sure we get back the same factor again
734734
F10 = CHOLMOD.lowrankdowndate(F11, C)
735-
@test full(sparse(F10)) AtA
735+
@test Array(sparse(F10)) AtA
736736
@test F10\ones(5) B0
737737

738738
#Test in-place update
739739
CHOLMOD.lowrankupdate!(F1, C)
740-
@test full(sparse(F1)) AtA+C*C'
740+
@test Array(sparse(F1)) AtA+C*C'
741741
@test F1\ones(5) B
742742
#Test in-place downdate
743743
CHOLMOD.lowrankdowndate!(F1, C)
744-
@test full(sparse(F1)) AtA
744+
@test Array(sparse(F1)) AtA
745745
@test F1\ones(5) B0
746746

747747
@test C == Ctest #Make sure C didn't change

test/sparse/sparse.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@ end
592592

593593
@test R == real.(S) == real(S)
594594
@test I == imag.(S) == imag(S)
595-
@test conj(full(S)) == conj.(S) == conj(S)
595+
@test conj(Array(S)) == conj.(S) == conj(S)
596596
@test real.(spR) == R
597597
@test nnz(imag.(spR)) == nnz(imag(spR)) == 0
598598
@test abs.(S) == abs.(D)

test/sparse/spqr.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ nn = 100
3636
@test (eye(m)*Q)*Q' eye(m)
3737

3838
# test that Q'Pl*A*Pr = R
39-
R0 = Q'*full(A[F[:prow], F[:pcol]])
39+
R0 = Q'*Array(A[F[:prow], F[:pcol]])
4040
@test R0[1:n, :] F[:R]
4141
@test norm(R0[n + 1:end, :], 1) < 1e-12
4242

@@ -70,7 +70,7 @@ end
7070
A = sprandn(m, 5, 0.9)*sprandn(5, n, 0.9)
7171
b = randn(m)
7272
xs = A\b
73-
xd = full(A)\b
73+
xd = Array(A)\b
7474

7575
# check that basic solution has more zeros
7676
@test count(!iszero, xs) < count(!iszero, xd)

0 commit comments

Comments
 (0)