Skip to content

Commit 0f636d2

Browse files
Make cond(::SparseMatrix, 1/Inf) discoverable from 2-norm error
1 parent 6d072a8 commit 0f636d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/linalg.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1577,7 +1577,7 @@ function cond(A::AbstractSparseMatrixCSC, p::Real=2)
15771577
normA = opnorm(A, Inf)
15781578
return normA * normAinv
15791579
elseif p == 2
1580-
throw(ArgumentError("2-norm condition number is not implemented for sparse matrices, try cond(Array(A), 2) instead"))
1580+
throw(ArgumentError("only 1- and Inf-norm condition number are implemented for sparse matrices, for 2-norm try cond(Array(A), 2) instead"))
15811581
else
15821582
throw(ArgumentError("second argument must be either 1 or Inf, got $p"))
15831583
end

0 commit comments

Comments
 (0)