In Julia 1.0.2,
julia> D = convert(SparseMatrixCSC{Float32,Int32}, spdiagm(0 => rand(5)))
julia> D[2:3,:]
ERROR: MethodError: no method matching getindex_traverse_col(::UnitRange{Int64}, ::Int32, ::Int64)
Closest candidates are:
getindex_traverse_col(::AbstractUnitRange, ::Int64, ::Int64) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/SparseArrays/src/sparsematrix.jl:1971
getindex_traverse_col(::StepRange, ::Int64, ::Int64) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/SparseArrays/src/sparsematrix.jl:1972
Stacktrace:
[1] macro expansion at ./simdloop.jl:72 [inlined]
[2] getindex(::SparseMatrixCSC{Float32,Int32}, ::UnitRange{Int64}, ::UnitRange{Int64}) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/SparseArrays/src/sparsematrix.jl:1995
[3] getindex(::SparseMatrixCSC{Float32,Int32}, ::UnitRange{Int64}, ::Colon) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/SparseArrays/src/sparsematrix.jl:1934
[4] top-level scope at none:0
This seems to fix it:
julia> import SparseArrays.getindex_traverse_col
julia> getindex_traverse_col(::AbstractUnitRange, lo::Ti, hi::Tj) where {Ti<:Integer,Tj<:Integer} = lo:hi
Is that the way to go?