Does sum along a dimensional axis not work with sparse arrays?
a = sparse([1,2,3], [1,2,3], [ 1, 1, 2])
sum(a, 1)
ERROR: MethodError: objects of type SparseMatrixCSC{Int64,Int64} are not callable
Use square brackets [] for indexing an Array.
Stacktrace:
[1] mapreduce_first(::SparseMatrixCSC{Int64,Int64}, ::Function, ::Int64) at ./reduce.jl:297
[2] mapreduce(::SparseMatrixCSC{Int64,Int64}, ::Function, ::Int64) at ./reduce.jl:324
[3] sum(::SparseMatrixCSC{Int64,Int64}, ::Int64) at ./reduce.jl:399
[4] top-level scope at none:0