I found what I believe to be a bug in SparseArrays. If I try to make a sparse array with more rows than the max row number It fails with the error:
11×10 SparseMatrixCSC{Any, Int64} with 100 stored entries:
ERROR: MethodError: no method matching zero(::Type{Any})
Note that it actually creates the array A and I can do math with it, but for some reason it cannot display A. A minimum example of faliure is the following:
using SparseArrays
N = 10
M = 1
rows = []
cols = []
vals = []
for i = 1:N
for j = 1:N
push!(rows, i)
push!(cols, j)
push!(vals, 1)
end
end
A = sparse(rows, cols, vals, N+M, N)
to make is stranger, if you set M to be 1,2,3,4, or 5 it fails, but if you set M>5 it works.