diff --git a/src/SparseArrays.jl b/src/SparseArrays.jl index 2688a449..aec895ae 100644 --- a/src/SparseArrays.jl +++ b/src/SparseArrays.jl @@ -32,7 +32,7 @@ export AbstractSparseArray, AbstractSparseMatrix, AbstractSparseVector, SparseMatrixCSC, SparseVector, blockdiag, droptol!, dropzeros!, dropzeros, issparse, nonzeros, nzrange, rowvals, sparse, sparsevec, spdiagm, sprand, sprandn, spzeros, nnz, permute, findnz, fkeep!, ftranspose!, - sparse_hcat, sparse_vcat, sparse_hvcat + sparse_hcat, sparse_vcat, sparse_hvcat, colvals const LinAlgLeftQs = Union{HessenbergQ,QRCompactWYQ,QRPackedQ} diff --git a/src/sparsematrix.jl b/src/sparsematrix.jl index 80074402..ae3f4d08 100644 --- a/src/sparsematrix.jl +++ b/src/sparsematrix.jl @@ -2956,6 +2956,8 @@ end ((r1 > r2) || (rowvals(A)[r1] != i0)) ? zero(T) : nonzeros(A)[r1] end +@RCI @propagate_inbounds getindex(A::AbstractSparseMatrixCSR, I::Tuple{Integer,Integer}) = getindex(A, I[1], I[2]) + @RCI @propagate_inbounds function getindex(A::AbstractSparseMatrixCSR{T}, i0::Integer, i1::Integer) where T @boundscheck checkbounds(A, i0, i1) c1 = Int(@inbounds getrowptr(A)[i0])