We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f8f0f40 commit b3872c8Copy full SHA for b3872c8
src/sparsematrix.jl
@@ -294,6 +294,9 @@ column. In conjunction with [`nonzeros`](@ref) and
294
# perform sparse wizardry...
295
end
296
297
+
298
+!!! warning
299
+ Adding or removing nonzero elements to the matrix may invalidate the `nzrange`, one should not mutate the matrix while iterating.
300
"""
301
nzrange(S::AbstractSparseMatrixCSC, col::Integer) = getcolptr(S)[col]:(getcolptr(S)[col+1]-1)
302
nzrange(S::SparseMatrixCSCView, col::Integer) = nzrange(S.parent, S.indices[2][col])
0 commit comments