On 0.7.0
using LinearAlgebra, SparseArrays
m = 2
A = sparse(1.0I, m, m)
ind = [CartesianIndex(i, i) for i = 1:m]
julia> A[ind]
MethodError: no method matching isless(::CartesianIndex{2}, ::Int64)
Closest candidates are:
isless(!Matched::Missing, ::Any) at missing.jl:66
isless(!Matched::AbstractFloat, ::Real) at operators.jl:150
isless(!Matched::Real, ::Real) at operators.jl:338
...
Stacktrace:
[1] <(::CartesianIndex{2}, ::Int64) at .\operators.jl:260
[2] getindex(::SparseMatrixCSC{Float64,Int64}, ::Array{CartesianIndex{2},1}) at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v0.7\SparseArrays\src\sparsevector.jl:667
[3] top-level scope at In[4]:1
Is this related to SparseMatrixCSC as a general sparse container: Setindex!(...) not working for SparseMatrixCSC with vector elements (v0.7)?