I have a sparse 2x2 matrix:
using SparseArrays
sm = SparseMatrixCSC(2, 2, [1, 3, 4], [1, 2, 1], [1.0, 0.0, 1.0])
that looks like:
1.0 1.0
0.0 ⋅
is there a way to check whenever element [2,2]
is filled or not? Normally, I could do
sm[2,2] == 0.0
but that returns true
both for [2,1]
and [2,2]
.