Skip to content

Commit c788e9a

Browse files
Add missing function _isnotzero (#122)
1 parent 650f566 commit c788e9a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Pardiso.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,9 @@ end
283283

284284
# Copied from SparseArrays.jl but with a tweak
285285
# to check symmetry of the sparsity pattern
286+
@inline _isnotzero(x) = iszero(x) !== true # like `!iszero(x)`, but handles `x::Missing`
287+
@inline _isnotzero(x::Number) = !iszero(x)
288+
@inline _isnotzero(x::AbstractArray) = !iszero(x)
286289
function _is_hermsym(A::SparseMatrixCSC, check::Function)
287290
m, n = size(A)
288291
if m != n; return false; end

0 commit comments

Comments
 (0)