Skip to content

Commit

Permalink
Eliminate uses of full from test/sparse/spqr.jl and test/sparse/spars…
Browse files Browse the repository at this point in the history
…e.jl.
  • Loading branch information
Sacha0 committed Sep 27, 2017
1 parent 6473693 commit fc37cf5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/sparse/sparse.jl
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ end

@test R == real.(S) == real(S)
@test I == imag.(S) == imag(S)
@test conj(full(S)) == conj.(S) == conj(S)
@test conj(Array(S)) == conj.(S) == conj(S)
@test real.(spR) == R
@test nnz(imag.(spR)) == nnz(imag(spR)) == 0
@test abs.(S) == abs.(D)
Expand Down
4 changes: 2 additions & 2 deletions test/sparse/spqr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ nn = 100
@test (eye(m)*Q)*Q' eye(m)

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

Expand Down Expand Up @@ -70,7 +70,7 @@ end
A = sprandn(m, 5, 0.9)*sprandn(5, n, 0.9)
b = randn(m)
xs = A\b
xd = full(A)\b
xd = Array(A)\b

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

0 comments on commit fc37cf5

Please sign in to comment.